Skip to content

Commit 01ba5af

Browse files
committed
Issue #121: Removing lost+found from dblist
1 parent f7f2754 commit 01ba5af

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

mysqltuner.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,7 +1560,8 @@ sub check_storage_engines {
15601560
: redwrap "-NDBCluster ";
15611561
}
15621562

1563-
my @dblist = select_array "SHOW DATABASES";
1563+
my @dblist = grep {$_ ne 'lost+found' } select_array "SHOW DATABASES";
1564+
15641565
$result{'Databases'}{'List'} = [@dblist];
15651566
infoprint "Status: $engines";
15661567
if ( mysql_version_ge( 5, 1, 5 ) ) {
@@ -1595,7 +1596,7 @@ sub check_storage_engines {
15951596
# MySQL < 5 servers take a lot of work to get table sizes
15961597
my @tblist;
15971598

1598-
# Now we build a database list, and loop through it to get storage engine stats for tables
1599+
# Now we build a database list, and loop through it to get storage engine stats for tables
15991600
foreach my $db (@dblist) {
16001601
chomp($db);
16011602
if ( $db eq "information_schema"
@@ -1621,6 +1622,7 @@ sub check_storage_engines {
16211622
foreach my $tbl (@tblist) {
16221623
debugprint "Data dump ". Dumper (@$tbl);
16231624
my ( $engine, $size, $datafree ) = @$tbl;
1625+
next if $engine eq 'NULL';
16241626
$size=0 if $size eq 'NULL';
16251627
$datafree=0 if $datafree eq 'NULL';
16261628
if ( defined $enginestats{$engine} ) {
@@ -3553,4 +3555,4 @@ =head1 COPYRIGHT AND LICENSE
35533555
# indent-tabs-mode: t
35543556
# cperl-indent-level: 8
35553557
# perl-indent-level: 8
3556-
# End:
3558+
# End:

0 commit comments

Comments
 (0)