fixed problems with non-isam tables
This commit is contained in:
@@ -29,8 +29,8 @@ $Source$
|
||||
* tbl_change.php3: current value of enums was lost.
|
||||
|
||||
2001-08-03 Steve Alberty <alberty@neptunlabs.de>
|
||||
* 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 <om@omnis.ch>
|
||||
|
@@ -129,30 +129,42 @@ else if (MYSQL_MAJOR_VERSION >= 3.23 && isset($tbl_cache)) {
|
||||
</td>
|
||||
<?php
|
||||
echo "\n";
|
||||
$mergetable = FALSE;
|
||||
if (isset($sts_data['Type']) && $sts_data['Type'] == 'MRG_MyISAM') {
|
||||
$mergetable = TRUE;
|
||||
$mergetable=false;
|
||||
$nonisam=false;
|
||||
if (isset($sts_data['Type'])) {
|
||||
if ($sts_data['Type']=="MRG_MyISAM") $mergetable=true;
|
||||
else if (!eregi("ISAM", $sts_data['Type'])) $nonisam=true;
|
||||
}
|
||||
|
||||
if (isset($sts_data['Rows']))
|
||||
{
|
||||
if ($mergetable == false){
|
||||
if ($nonisam == false){
|
||||
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
||||
$sum_size += $tblsize;
|
||||
if ($tblsize > 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="";
|
||||
}
|
||||
?>
|
||||
<td align="right">
|
||||
<?php
|
||||
|
@@ -266,16 +266,21 @@ if ($index_count > 0) {
|
||||
?>
|
||||
<?php
|
||||
// BEGIN - Calc Table Space - staybyte - 9 June 2001
|
||||
if (MYSQL_MAJOR_VERSION >= 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']);
|
||||
}
|
||||
|
Reference in New Issue
Block a user