Skip to content

Commit

Permalink
Fixed an issue where null storage engines appeared when querying INFO…
Browse files Browse the repository at this point in the history
…RMATION_SCHEMA.
  • Loading branch information
major committed May 28, 2009
1 parent a2bb3ab commit e419c79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mysqltuner.pl
Expand Up @@ -429,7 +429,7 @@ sub check_storage_engines {
print "$engines\n";
if ($mysqlvermajor >= 5) {
# MySQL 5 servers can have table sizes calculated quickly from information schema
my @templist = `mysql $mysqllogin -Bse "SELECT ENGINE,SUM(DATA_LENGTH),COUNT(ENGINE) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') GROUP BY ENGINE ORDER BY ENGINE ASC;"`;
my @templist = `mysql $mysqllogin -Bse "SELECT ENGINE,SUM(DATA_LENGTH),COUNT(ENGINE) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','mysql') AND ENGINE IS NOT NULL GROUP BY ENGINE ORDER BY ENGINE ASC;"`;
foreach my $line (@templist) {
my ($engine,$size,$count);
($engine,$size,$count) = $line =~ /([a-zA-Z_]*)\s+(\d+)\s+(\d+)/;
Expand Down

0 comments on commit e419c79

Please sign in to comment.