Issue #121: Removing lost+found from dblist

This commit is contained in:
Jean-Marie RENOUARD 2015-09-02 15:40:57 +02:00
parent f7f2754504
commit 01ba5af0ea

View file

@ -1560,7 +1560,8 @@ sub check_storage_engines {
: redwrap "-NDBCluster "; : redwrap "-NDBCluster ";
} }
my @dblist = select_array "SHOW DATABASES"; my @dblist = grep {$_ ne 'lost+found' } select_array "SHOW DATABASES";
$result{'Databases'}{'List'} = [@dblist]; $result{'Databases'}{'List'} = [@dblist];
infoprint "Status: $engines"; infoprint "Status: $engines";
if ( mysql_version_ge( 5, 1, 5 ) ) { 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 # MySQL < 5 servers take a lot of work to get table sizes
my @tblist; 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) { foreach my $db (@dblist) {
chomp($db); chomp($db);
if ( $db eq "information_schema" if ( $db eq "information_schema"
@ -1621,6 +1622,7 @@ sub check_storage_engines {
foreach my $tbl (@tblist) { foreach my $tbl (@tblist) {
debugprint "Data dump ". Dumper (@$tbl); debugprint "Data dump ". Dumper (@$tbl);
my ( $engine, $size, $datafree ) = @$tbl; my ( $engine, $size, $datafree ) = @$tbl;
next if $engine eq 'NULL';
$size=0 if $size eq 'NULL'; $size=0 if $size eq 'NULL';
$datafree=0 if $datafree eq 'NULL'; $datafree=0 if $datafree eq 'NULL';
if ( defined $enginestats{$engine} ) { if ( defined $enginestats{$engine} ) {