major/MySQLTuner-perl

cannot set $opt{myisamstat} == 0

sherrardb opened this issue · 2 comments

good day all,
i might be missing something about the intended usage, but i cannot seem to disable the MyISAM recommendations. when executing mysqltuner.pl --nomyisamstat, the value of $opt{myisamstat} still ends up set to 1, per

$opt{myisamstat} = 1
  if ( not defined( $opt{myisamstat} ) or $opt{nomyisamstat} == 0 )
  ;    # Don't print MyISAM table information

best i can tell, before this point $opt{myisamstat} will always either be 1 if $opt{verbose} or undef otherwise, thereby always resulting in $opt{myisamstat} being set to 1, which allows mysql_myisam() to fire, per

sub mysql_myisam {
    return 0 unless ( $opt{'myisamstat'} > 0 );

this seems to be a regression introduced in 3159e13.

i did not create an adjoining PR because

  1. i am not yet sure that this is not my misunderstanding
  2. i am not clear on the actual intentions behind the default option values and the interplay between $opt{myisamstat} and $opt{nomyisamstat} or the necessity of having both.

TIA

Fixed

merci, beaucoup
bonsoir