From 04deb1a925d4ef846fc55af3241f25083808ba32 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 19 Mar 2006 12:19:34 +0000 Subject: [PATCH] bug #1445853, overhead should not display the exact number of bytes --- db_details_structure.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/db_details_structure.php b/db_details_structure.php index e1aeede9b..596a95397 100644 --- a/db_details_structure.php +++ b/db_details_structure.php @@ -246,9 +246,9 @@ foreach ($tables as $keyname => $each_table) { if ($cfg['ShowStats']) { $tblsize = doubleval($each_table['Data_length']) + doubleval($each_table['Index_length']); $sum_size += $tblsize; - list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); + list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); if (isset($each_table['Data_free']) && $each_table['Data_free'] > 0) { - list($formated_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free']); + list($formatted_overhead, $overhead_unit) = PMA_formatByteDown($each_table['Data_free'], 3, ($each_table['Data_free'] > 0) ? 1 : 0); $overhead_size += $each_table['Data_free']; } } @@ -259,21 +259,21 @@ foreach ($tables as $keyname => $each_table) { if ($cfg['ShowStats']) { $tblsize = $each_table['Data_length'] + $each_table['Index_length']; $sum_size += $tblsize; - list($formated_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); + list($formatted_size, $unit) = PMA_formatByteDown($tblsize, 3, ($tblsize > 0) ? 1 : 0); } //$display_rows = ' - '; $sum_entries += $each_table['TABLE_ROWS']; } elseif (preg_match('@^(MRG_MyISAM|BerkeleyDB)$@', $each_table['ENGINE'])) { // Merge or BerkleyDB table: Only row count is accurate. if ($cfg['ShowStats']) { - $formated_size = ' - '; + $formatted_size = ' - '; $unit = ''; } $sum_entries += $each_table['TABLE_ROWS']; } else { // Unknown table type. if ($cfg['ShowStats']) { - $formated_size = 'unknown'; + $formatted_size = 'unknown'; $unit = ''; } } @@ -289,11 +289,11 @@ foreach ($tables as $keyname => $each_table) { } if ($cfg['ShowStats']) { - if (isset($formated_overhead)) { + if (isset($formatted_overhead)) { $overhead = '' . $formated_overhead + . $tbl_url_query . '#showusage">' . $formatted_overhead . ' ' . $overhead_unit . '' . "\n"; - unset($formated_overhead); + unset($formatted_overhead); $overhead_check .= "document.getElementById('checkbox_tbl_$i').checked = true;"; } else { @@ -366,7 +366,7 @@ foreach ($tables as $keyname => $each_table) { + > @@ -388,8 +388,8 @@ foreach ($tables as $keyname => $each_table) { // Show Summary if ($cfg['ShowStats']) { - list($sum_formated, $unit) = PMA_formatByteDown($sum_size, 3, 1); - list($overhead_formated, $overhead_unit) = + list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1); + list($overhead_formatted, $overhead_unit) = PMA_formatByteDown($overhead_size, 3, 1); } ?> @@ -416,8 +416,8 @@ if (!($cfg['PropertiesNumColumns'] > 1)) { if ($cfg['ShowStats']) { ?> - - + +