Skip to content

Commit f18a3ef

Browse files
committed
Update mysqltuner.pl
FAIL Execute SQL / return code: 256 #442 disable column type to ENUM suggestion #356
1 parent a9bed2f commit f18a3ef

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

mysqltuner.pl

+8-3
Original file line numberDiff line numberDiff line change
@@ -6034,14 +6034,19 @@ sub mysql_tables {
60346034
infoprint " Current Fieldtype: $current_type";
60356035
#infoprint " Optimal Fieldtype: Not available";
60366036
}
6037-
elsif ( $current_type ne $optimal_type ) {
6037+
elsif ( $current_type ne $optimal_type and $current_type !~ /.*DATETIME.*/ and $current_type !~ /.*TIMESTAMP.*/) {
60386038
infoprint " Current Fieldtype: $current_type";
6039-
infoprint " Optimal Fieldtype: $optimal_type";
6040-
badprint
6039+
if ($optimal_type =~ /.*ENUM\(.*/ ) {
6040+
$optimal_type ="ENUM( ... )";
6041+
}
6042+
infoprint " Optimal Fieldtype: $optimal_type ";
6043+
if ($optimal_type !~ /.*ENUM\(.*/ ) {
6044+
badprint
60416045
"Consider changing type for column $_ in table $dbname.$tbname";
60426046
push( @generalrec,
60436047
"ALTER TABLE \`$dbname\`.\`$tbname\` MODIFY \`$_\` $optimal_type;"
60446048
);
6049+
}
60456050

60466051
}
60476052
else {

0 commit comments

Comments
 (0)