Comment 2 for bug 530456

Revision history for this message
dalin (dave-hansen-lange) wrote : Re: [Bug 530456] Re: undefined variables

Not knowing anything about Perl, is there some equivalent to:
if (!empty($foo)) {
  // Do something with $foo.
}

On Tue, Mar 2, 2010 at 9:52 PM, Sheeri K. Cabral <email address hidden> wrote:

> 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...
>
> ** Changed in: mysqltuner
> Assignee: (unassigned) => Sheeri K. Cabral (awfief)
>
> --
> undefined variables
> https://bugs.launchpad.net/bugs/530456
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in MySQL Tuner: New
>
> 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.plline
> 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
> ./mysqltuner.pl line 230 (#1)
> Use of uninitialized value in string eq at ./mysqltuner.pl line 231 (#1)
> table open cache size (5.1+):
> table cache size: 64.00
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/mysqltuner/+bug/530456/+subscribe
>