@@ -235,10 +235,9 @@ package main;
235
235
if ( $opt {nopfstat } == 1 ); # Don't print performance schema information
236
236
$opt {idxstat } = 0 if ( $opt {noidxstat } == 1 ); # Don't print index information
237
237
$opt {structstat } = 0
238
- if ( $opt {nostructstat } == 1 ); # Don't print table struct information
239
- $opt {myisamstat } = 0
240
- if ( $opt {nomyisamstat } == 1 ); # Don't print MyISAM table information
241
-
238
+ if ( not defined ($opt {structstat }) or $opt {nostructstat } == 1 ); # Don't print table struct information
239
+ $opt {myisamstat } = 1
240
+ if ( not defined ($opt {myisamstat }) or $opt {nomyisamstat } == 0 ); # Don't print MyISAM table information
242
241
# for RPM distributions
243
242
$opt {cvefile } = " /usr/share/mysqltuner/vulnerabilities.csv"
244
243
unless ( defined $opt {cvefile } and -f " $opt {cvefile}" );
@@ -3857,7 +3856,7 @@ sub mysql_stats {
3857
3856
3858
3857
# Recommendations for MyISAM
3859
3858
sub mysql_myisam {
3860
- return 0 unless $opt {' myisamstat' } == 1 ;
3859
+ return 0 unless ( $opt {' myisamstat' } > 0) ;
3861
3860
subheaderprint " MyISAM Metrics" ;
3862
3861
my $nb_myisam_tables = select_one(
3863
3862
" SELECT COUNT(*) FROM information_schema.TABLES WHERE ENGINE='MyISAM' and TABLE_SCHEMA NOT IN ('mysql','information_schema','performance_schema')"
@@ -5807,7 +5806,7 @@ sub get_wsrep_option {
5807
5806
5808
5807
# REcommendations for Tables
5809
5808
sub mysql_table_structures {
5810
- return 0 unless $opt {structstat } == 1 ;
5809
+ return 0 unless ( $opt {structstat } > 0) ;
5811
5810
subheaderprint " Table structures analysis" ;
5812
5811
5813
5812
my @primaryKeysNbTables = select_array(
0 commit comments