From 01ba5af0ea898df3260dd0ce4111f5098411345e Mon Sep 17 00:00:00 2001 From: Jean-Marie RENOUARD Date: Wed, 2 Sep 2015 15:40:57 +0200 Subject: [PATCH] Issue #121: Removing lost+found from dblist --- mysqltuner.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index a43b166..3efdb1e 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -1560,7 +1560,8 @@ sub check_storage_engines { : redwrap "-NDBCluster "; } - my @dblist = select_array "SHOW DATABASES"; + my @dblist = grep {$_ ne 'lost+found' } select_array "SHOW DATABASES"; + $result{'Databases'}{'List'} = [@dblist]; infoprint "Status: $engines"; if ( mysql_version_ge( 5, 1, 5 ) ) { @@ -1595,7 +1596,7 @@ sub check_storage_engines { # MySQL < 5 servers take a lot of work to get table sizes my @tblist; -# Now we build a database list, and loop through it to get storage engine stats for tables + # Now we build a database list, and loop through it to get storage engine stats for tables foreach my $db (@dblist) { chomp($db); if ( $db eq "information_schema" @@ -1621,6 +1622,7 @@ sub check_storage_engines { foreach my $tbl (@tblist) { debugprint "Data dump ". Dumper (@$tbl); my ( $engine, $size, $datafree ) = @$tbl; + next if $engine eq 'NULL'; $size=0 if $size eq 'NULL'; $datafree=0 if $datafree eq 'NULL'; if ( defined $enginestats{$engine} ) { @@ -3553,4 +3555,4 @@ along with this program. If not, see . # indent-tabs-mode: t # cperl-indent-level: 8 # perl-indent-level: 8 -# End: +# End: \ No newline at end of file