Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'master' of https://github.com/scop/MySQLTuner-perl into…

… scop-master
  • Loading branch information...
commit 23f582fe279c8d19da30db4040151fa83616652f 2 parents e8495ce + 778cc60
Major Hayden authored

Showing 1 changed file with 21 additions and 1 deletion. Show diff stats Hide diff stats

  1. +21 1 mysqltuner.pl
22 mysqltuner.pl
@@ -354,6 +354,26 @@ sub get_all_vars {
354 354 $line =~ /([a-zA-Z_]*)\s*(.*)/;
355 355 $mystat{$1} = $2;
356 356 }
  357 + # Workaround for MySQL bug #59393 wrt. ignore-builtin-innodb
  358 + if (($myvar{'ignore_builtin_innodb'} || "") eq "ON") {
  359 + $myvar{'have_innodb'} = "NO";
  360 + }
  361 + # have_* for engines is deprecated and will be removed in MySQL 5.6;
  362 + # check SHOW ENGINES and set corresponding old style variables.
  363 + # Also works around MySQL bug #59393 wrt. skip-innodb
  364 + my @mysqlenginelist = `mysql $mysqllogin -Bse "SHOW ENGINES;" 2>/dev/null`;
  365 + foreach my $line (@mysqlenginelist) {
  366 + if ($line =~ /^([a-zA-Z_]+)\s+(\S+)/) {
  367 + my $engine = lc($1);
  368 + if ($engine eq "federated" || $engine eq "blackhole") {
  369 + $engine .= "_engine";
  370 + } elsif ($engine eq "berkeleydb") {
  371 + $engine = "bdb";
  372 + }
  373 + my $val = ($2 eq "DEFAULT") ? "YES" : $2;
  374 + $myvar{"have_$engine"} = $val;
  375 + }
  376 + }
357 377 }
358 378
359 379 sub security_recommendations {
@@ -455,7 +475,7 @@ sub check_storage_engines {
455 475 my $engines;
456 476 $engines .= (defined $myvar{'have_archive'} && $myvar{'have_archive'} eq "YES")? greenwrap "+Archive " : redwrap "-Archive " ;
457 477 $engines .= (defined $myvar{'have_bdb'} && $myvar{'have_bdb'} eq "YES")? greenwrap "+BDB " : redwrap "-BDB " ;
458   - $engines .= (defined $myvar{'have_federated'} && $myvar{'have_federated'} eq "YES")? greenwrap "+Federated " : redwrap "-Federated " ;
  478 + $engines .= (defined $myvar{'have_federated_engine'} && $myvar{'have_federated_engine'} eq "YES")? greenwrap "+Federated " : redwrap "-Federated " ;
459 479 $engines .= (defined $myvar{'have_innodb'} && $myvar{'have_innodb'} eq "YES")? greenwrap "+InnoDB " : redwrap "-InnoDB " ;
460 480 $engines .= (defined $myvar{'have_isam'} && $myvar{'have_isam'} eq "YES")? greenwrap "+ISAM " : redwrap "-ISAM " ;
461 481 $engines .= (defined $myvar{'have_ndbcluster'} && $myvar{'have_ndbcluster'} eq "YES")? greenwrap "+NDBCluster " : redwrap "-NDBCluster " ;

0 comments on commit 23f582f

Please sign in to comment.
Something went wrong with that request. Please try again.