Don't show "0 B" as InnoDB table size when DBMS doesn't provide this data (Drizzle)

This commit is contained in:
Piotr Przybylski 2011-05-07 22:25:55 +02:00
parent 7e63fd4573
commit 0f49267fd7

View File

@ -175,7 +175,8 @@ foreach ($tables as $keyname => $each_table) {
$each_table['COUNTED'] = false;
}
if ($is_show_stats) {
// Drizzle doesn't provide data and index length, check for null
if ($is_show_stats && $each_table['Data_length'] !== null) {
$tblsize = $each_table['Data_length'] + $each_table['Index_length'];
$sum_size += $tblsize;
list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0);