diff --git a/ChangeLog b/ChangeLog index 81144840d..febada456 100755 --- a/ChangeLog +++ b/ChangeLog @@ -29,8 +29,8 @@ $Source$ * tbl_change.php3: current value of enums was lost. 2001-08-03 Steve Alberty - * tbl_properties.php3, db_details.php3: fixed problem with table size - display and MERGE tables. + * tbl_properties.php3, db_details.php3: fixed problems with table + size display and Non-ISAM tables * tbl_qbe.php3: remove some warnings in higher errorlevel 2001-08-03 Olivier Müller diff --git a/db_details.php3 b/db_details.php3 index 235d52352..2b778a413 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -129,30 +129,42 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) { 0) { + list($formated_size, $unit) = format_byte_down($tblsize, 3, 1); + } else { + list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); } - if (isset($sts_data['Rows'])) { - if ($mergetable == FALSE) { - $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; - $sum_size += $tblsize; - $sum_entries += $sts_data['Rows']; - if ($tblsize > 0) { - list($formated_size, $unit) = format_byte_down($tblsize, 3, 1); - } else { - list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); - } - } - // MyISAM MERGE Table - else if ($mergetable == TRUE) { - $formated_size = ' - '; - $unit = ''; - } - else { - $formated_size = 'unknown'; - $unit = ''; - } + } + else { + $formated_size=" - "; + $unit=""; + } + if (isset($sts_data['Rows'])) $sum_entries += $sts_data['Rows']; + } + // MyISAM MERGE Table + else if ($mergetable == true) + { + $formated_size=" - "; + $unit=""; + } + else + { + $formated_size="unknown"; + $unit=""; + } ?> 0) { ?> = 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $tbl_type != 'INNODB' && isset($showtable)) { +$nonisam=false; +if (!eregi("ISAM", $showtable['Type'])) $nonisam=true; +if (MYSQL_MAJOR_VERSION >= 3.23 && intval(MYSQL_MINOR_VERSION) > 3 && $nonisam==false && isset($showtable)) { // Gets some sizes - $mergetable = FALSE; - if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { - $mergetable = TRUE; + $mergetable=false; + if (isset($showtable['Type']) && $showtable['Type']=="MRG_MyISAM") { + $mergetable=true; } - list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); - if ($mergetable == FALSE) { + + list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); + + if ($mergetable==false) { 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']); }