Skip to content

Commit 122d23c

Browse files
authored
Merge pull request #446 from ebroto/bugfix/escape-identifiers-in-table-column-metrics
Escape identifiers in table column metrics
2 parents 42a9586 + ece5671 commit 122d23c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mysqltuner.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5994,7 +5994,7 @@ sub mysql_tables {
59945994
my $current_type =
59955995
uc($ctype) . ( $isnull eq 'NO' ? " NOT NULL" : "" );
59965996
my $optimal_type = select_str_g( "Optimal_fieldtype",
5997-
"SELECT $_ FROM $dbname.$tbname PROCEDURE ANALYSE(100000)"
5997+
"SELECT \\`$_\\` FROM \\`$dbname\\`.\\`$tbname\\` PROCEDURE ANALYSE(100000)"
59985998
);
59995999
if ( not defined($optimal_type) or $optimal_type eq '' ) {
60006000
infoprint " Current Fieldtype: $current_type";
@@ -6006,7 +6006,7 @@ sub mysql_tables {
60066006
badprint
60076007
"Consider changing type for column $_ in table $dbname.$tbname";
60086008
push( @generalrec,
6009-
"ALTER TABLE $dbname.$tbname MODIFY $_ $optimal_type;"
6009+
"ALTER TABLE \`$dbname\`.\`$tbname\` MODIFY \`$_\` $optimal_type;"
60106010
);
60116011

60126012
}

0 commit comments

Comments
 (0)