On a system with InnoDB disabled...
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED -InnoDB +MRG_MYISAM
MySQLTuner throws an error attempting to print the uninitialized value Innodb_log_waits at line 969.
Use of uninitialized value $mystat{"Innodb_log_waits"} in concatenation (.) or
string at ./MySQLTuner/mysqltuner.pl line 969 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.
To help you figure out what was undefined, perl will try to tell you the
name of the variable (if any) that was undefined. In some cases it cannot
do this, so it also tells you what operation you used the undefined value
in. Note, however, that perl optimizes your program and the operation
displayed in the warning may not necessarily appear literally in your
program. For example, "that $foo" is usually optimized into "that "
. $foo, and the warning will refer to the concatenation (.) operator,
even though there is no . in your program.
[OK] InnoDB log waits:
This is because the if/else block beginning at line 965 will execute even when have_innodb is undefined or set to NO and Innodb_log_waits being undefined triggers the else block which attempts to print Innodb_log_waits.
if (defined $mystat{'Innodb_log_waits'} && $mystat{'Innodb_log_waits'} > 0) {
badprint "InnoDB log waits: ".$mystat{'Innodb_log_waits'};
push(@adjvars,"innodb_log_buffer_size (>= ".hr_bytes_rnd($myvar{'innodb_log_buffer_size'}).")");
} else {
goodprint "InnoDB log waits: ".$mystat{'Innodb_log_waits'};
}
The solution seems to be shifting this if/else block up into the if block beginning at line 957 or adding a new else if to ensure that Innodb_log_waits is defined.
On a system with InnoDB disabled...
MySQLTuner throws an error attempting to print the uninitialized value Innodb_log_waits at line 969.
This is because the if/else block beginning at line 965 will execute even when have_innodb is undefined or set to NO and Innodb_log_waits being undefined triggers the else block which attempts to print Innodb_log_waits.
The solution seems to be shifting this if/else block up into the if block beginning at line 957 or adding a new else if to ensure that Innodb_log_waits is defined.