Skip to content

Commit

Permalink
Merge pull request #439 from mpirio/fix/innodb_stats_on_metadataVarNo…
Browse files Browse the repository at this point in the history
…tExists

$myvar{'innodb_stats_on_metadata'} may not exist
  • Loading branch information
jmrenouard authored May 21, 2019
2 parents 221e88b + b10c90c commit 037f720
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5766,14 +5766,16 @@ sub mysql_innodb {

sub check_metadata_perf {
subheaderprint "Analysis Performance Metrics";
infoprint "innodb_stats_on_metadata: " . $myvar{'innodb_stats_on_metadata'};
if ( $myvar{'innodb_stats_on_metadata'} eq 'ON' ) {
badprint "Stat are updated during querying INFORMATION_SCHEMA.";
push @adjvars, "SET innodb_stats_on_metadata = OFF";

#Disabling innodb_stats_on_metadata
select_one("SET GLOBAL innodb_stats_on_metadata = OFF;");
return 1;
if (defined $myvar{'innodb_stats_on_metadata'}) {
infoprint "innodb_stats_on_metadata: " . $myvar{'innodb_stats_on_metadata'};
if ( $myvar{'innodb_stats_on_metadata'} eq 'ON' ) {
badprint "Stat are updated during querying INFORMATION_SCHEMA.";
push @adjvars, "SET innodb_stats_on_metadata = OFF";

#Disabling innodb_stats_on_metadata
select_one("SET GLOBAL innodb_stats_on_metadata = OFF;");
return 1;
}
}
goodprint "No stat updates during querying INFORMATION_SCHEMA.";
return 0;
Expand Down

0 comments on commit 037f720

Please sign in to comment.