diff --git a/ChangeLog b/ChangeLog index df15f19dc..9b958a6b5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-07-21 Steve Alberty + * db_details.php3,tbl_properties.php3: fix incorrect size + calculation with merge tables + 2001-07-21 Loïc Chapeaux * ob.lib.inc.php3, lines 50-54 & 73-76: fixed a bug with php3. diff --git a/db_details.php3 b/db_details.php3 index 5badc7531..6045ea63a 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -114,28 +114,46 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) { &zero_rows="> - 0) { - list($formated_size, $unit) = format_byte_down($tblsize, 3, 1); + list($formated_size, $unit) = format_byte_down($tblsize, 3, 1); } else { - list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); + list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); } - ?> + } + else if (isset($mergetable)) // MyISAM MERGE Table + { + $formated_size=" - "; + $unit=""; + } + else + { + $formated_size="unknown"; + $unit=""; + } + ?> - + "; + echo number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; + if (isset($mergetable)) echo ""; + ?>    - + ?> diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 4da0b47eb..80242cac3 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -262,8 +262,9 @@ if ($index_count > 0) { // BEGIN - Calc Table Space - staybyte - 9 June 2001 if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type != "INNODB" && isset($showtable)) { // Gets some sizes + if (isset($showtable['Type']) && $showtable['Type']=="MRG_MyISAM") $mergetable=true; list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); - list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); + if (!isset($mergetable)) list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); } @@ -293,15 +294,19 @@ if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_typ + + ?> @@ -400,7 +405,7 @@ if (MYSQL_MAJOR_VERSION == "3.23" && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_typ 0) { + if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && !isset($mergetable)) { echo (++$i%2) ? ' ' : ' ';