undefined variables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysqltuner |
In Progress
|
High
|
Sheeri K. Cabral |
Bug Description
Here's an excerpt from the output where perl reports some undefined variables. Sorry I know nothing about perl so I can't offer a patch.
table cache size (pre 5.1): 64.00
Use of uninitialized value $num in pattern match (m//) at ./mysqltuner.pl line
223 (#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.
Use of uninitialized value $compval in concatenation (.) or string at
Use of uninitialized value in string eq at ./mysqltuner.pl line 231 (#1)
table open cache size (5.1+):
table cache size: 64.00
This is because the tuner-default.cnf has both:
table_open_cache
table_cache
It looks like from your bug report that you are on MySQL 5.0 or less, because the "table_open_cache" variable could not be found. If you delete the line with "table_open_cache" from the tuner-default.cnf, the problem should go away.
The fix is to have 2 files -- one for 5.1 and one for 5.0 and less...