From 0f49267fd7204e8d40f025154e31bb377b491071 Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Sat, 7 May 2011 22:25:55 +0200 Subject: [PATCH] Don't show "0 B" as InnoDB table size when DBMS doesn't provide this data (Drizzle) --- db_structure.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db_structure.php b/db_structure.php index 74734069be..d35e42b592 100644 --- a/db_structure.php +++ b/db_structure.php @@ -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);