|
1 | 1 | #!/usr/bin/env perl
|
2 |
| -# mysqltuner.pl - Version 2.2.6 |
| 2 | +# mysqltuner.pl - Version 2.2.7 |
3 | 3 | # High Performance MySQL Tuning Script
|
4 | 4 | # Copyright (C) 2006-2023 Major Hayden - [email protected]
|
5 | 5 | # Copyright (C) 2015-2023 Jean-Marie Renouard - [email protected]
|
@@ -57,7 +57,7 @@ package main;
|
57 | 57 | #use Env;
|
58 | 58 |
|
59 | 59 | # Set up a few variables for use in the script
|
60 |
| -my $tunerversion = "2.2.6"; |
| 60 | +my $tunerversion = "2.2.7"; |
61 | 61 | my ( @adjvars, @generalrec );
|
62 | 62 |
|
63 | 63 | # Set defaults
|
@@ -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(
|
@@ -7355,7 +7354,7 @@ sub which {
|
7355 | 7354 |
|
7356 | 7355 | =head1 NAME
|
7357 | 7356 |
|
7358 |
| - MySQLTuner 2.2.6 - MySQL High Performance Tuning Script |
| 7357 | + MySQLTuner 2.2.7 - MySQL High Performance Tuning Script |
7359 | 7358 |
|
7360 | 7359 | =head1 IMPORTANT USAGE GUIDELINES
|
7361 | 7360 |
|
|
0 commit comments