Version 1.9.1 Incorrectly reporting performance schema is off #580
Recommendation to turn on performance_schema #579
This commit is contained in:
parent
55cdf92f8b
commit
2b44229a8e
1 changed files with 25 additions and 32 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
# mysqltuner.pl - Version 1.9.1
|
# mysqltuner.pl - Version 1.9.2
|
||||||
# High Performance MySQL Tuning Script
|
# High Performance MySQL Tuning Script
|
||||||
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
||||||
#
|
#
|
||||||
|
@ -56,7 +56,7 @@ use Cwd 'abs_path';
|
||||||
#use Env;
|
#use Env;
|
||||||
|
|
||||||
# Set up a few variables for use in the script
|
# Set up a few variables for use in the script
|
||||||
my $tunerversion = "1.9.1";
|
my $tunerversion = "1.9.2";
|
||||||
my ( @adjvars, @generalrec );
|
my ( @adjvars, @generalrec );
|
||||||
|
|
||||||
# Set defaults
|
# Set defaults
|
||||||
|
@ -3799,40 +3799,32 @@ sub mysqsl_pfs {
|
||||||
subheaderprint "Performance schema";
|
subheaderprint "Performance schema";
|
||||||
|
|
||||||
# Performance Schema
|
# Performance Schema
|
||||||
$myvar{'performance_schema'} = 'OFF'
|
$myvar{'performance_schema'} = 'OFF' unless defined( $myvar{'performance_schema'} );
|
||||||
unless defined( $myvar{'performance_schema'} );
|
|
||||||
if ( $myvar{'performance_schema'} eq 'OFF' ) {
|
if ( $myvar{'performance_schema'} eq 'OFF' ) {
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
}
|
||||||
|
|
||||||
|
# IF PFS is eanbled
|
||||||
|
if ( $myvar{'performance_schema'} eq 'OFF' ) {
|
||||||
|
infoprint "Performance schema is disabled.";
|
||||||
badprint "Performance_schema should be activated.";
|
badprint "Performance_schema should be activated.";
|
||||||
push( @adjvars, "performance_schema=ON" );
|
push( @adjvars, "performance_schema=ON" );
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Performance schema should be activated for better diagnostics" );
|
"Performance schema should be activated for better diagnostics" );
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
|
if ( $myvar{'performance_schema'} eq 'ON' ) {
|
||||||
infoprint "Performance_schema is activated.";
|
infoprint "Performance_schema is activated.";
|
||||||
}
|
debugprint "Performance schema is " . $myvar{'performance_schema'};
|
||||||
|
infoprint "Memory used by P_S: " . hr_bytes( get_pf_memory() );
|
||||||
# IF PFS is eanbled
|
|
||||||
unless ( $myvar{'performance_schema'} ne 'ON' ) {
|
|
||||||
infoprint "Performance schema is disabled.";
|
|
||||||
|
|
||||||
# REc enable PFS for diagnostics only
|
|
||||||
if ( mysql_version_ge( 5, 6 ) ) {
|
|
||||||
push( @generalrec,
|
|
||||||
"Performance schema should be activated for better diagnostics"
|
|
||||||
);
|
|
||||||
push( @adjvars, "performance_schema = ON enable PFS" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ( mysql_version_le( 5, 5 ) ) {
|
if ( mysql_version_le( 5, 5 ) ) {
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
"Performance schema shouldn't be activated for MySQL and MariaDB 5.5 and lower version"
|
"Performance schema shouldn't be activated for MySQL and MariaDB 5.5 and lower version"
|
||||||
);
|
);
|
||||||
push( @adjvars, "performance_schema = OFF disable PFS" );
|
push( @adjvars, "performance_schema = OFF disable PFS" );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
debugprint "Performance schema is " . $myvar{'performance_schema'};
|
|
||||||
infoprint "Memory used by P_S: " . hr_bytes( get_pf_memory() );
|
|
||||||
|
|
||||||
if ( mysql_version_eq( 10, 0 ) ) {
|
if ( mysql_version_eq( 10, 0 ) ) {
|
||||||
push( @generalrec,
|
push( @generalrec,
|
||||||
|
@ -3841,6 +3833,7 @@ sub mysqsl_pfs {
|
||||||
push( @adjvars, "performance_schema = OFF" );
|
push( @adjvars, "performance_schema = OFF" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
||||||
infoprint "Sys schema isn't installed.";
|
infoprint "Sys schema isn't installed.";
|
||||||
|
@ -6828,7 +6821,7 @@ __END__
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
MySQLTuner 1.9.1 - MySQL High Performance Tuning Script
|
MySQLTuner 1.9.2 - MySQL High Performance Tuning Script
|
||||||
|
|
||||||
=head1 IMPORTANT USAGE GUIDELINES
|
=head1 IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue