added the $cfgShowStats setting
This commit is contained in:
@@ -5,6 +5,14 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2001-09-20 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||
* main.php3: fixed an error I've done while merging patch #462787.
|
||||
* config.inc.php3; Documentation.html: added the $cfgShowStats setting and
|
||||
resorted the core phpMyAdmin settings in a more logical way.
|
||||
* db_details.php3; db_printview.php3; tbl_properties.php3;
|
||||
tbl_printview.php3: added the $cfgShowStats setting.
|
||||
* lang/italian.inc.php3: updated thanks to Pietro Danesi.
|
||||
|
||||
2001-09-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_properties.php3, db_details.php3, lang/*: start to merge new messages
|
||||
with parameters.
|
||||
|
@@ -139,7 +139,12 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<th colspan="6"><?php echo ucfirst($strAction); ?></th>
|
||||
<th><?php echo ucfirst($strRecords); ?></th>
|
||||
<th><?php echo ucfirst($strType); ?></th>
|
||||
<th><?php echo ucfirst($strSize); ?></th>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo '<th>' . ucfirst($strSize) . '</th>';
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
$i = $sum_entries = $sum_size = 0;
|
||||
@@ -201,7 +206,7 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
|
||||
if (isset($sts_data['Rows'])) {
|
||||
if ($mergetable == FALSE) {
|
||||
if ($nonisam == FALSE) {
|
||||
if ($cfgShowStats && $nonisam == FALSE) {
|
||||
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
||||
$sum_size += $tblsize;
|
||||
if ($tblsize > 0) {
|
||||
@@ -209,20 +214,18 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
} else {
|
||||
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
||||
}
|
||||
} else {
|
||||
} else if ($cfgShowStats) {
|
||||
$formated_size = ' - ';
|
||||
$unit = '';
|
||||
}
|
||||
if (isset($sts_data['Rows'])) {
|
||||
$sum_entries += $sts_data['Rows'];
|
||||
}
|
||||
$sum_entries += $sts_data['Rows'];
|
||||
}
|
||||
// MyISAM MERGE Table
|
||||
else if ($mergetable == TRUE) {
|
||||
else if ($cfgShowStats && $mergetable == TRUE) {
|
||||
$formated_size = ' - ';
|
||||
$unit = '';
|
||||
}
|
||||
else {
|
||||
else if ($cfgShowStats) {
|
||||
$formated_size = 'unknown';
|
||||
$unit = '';
|
||||
}
|
||||
@@ -240,11 +243,17 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<td nowrap="nowrap">
|
||||
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||
</td>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td align="right" nowrap="nowrap">
|
||||
|
||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
|
||||
</td>
|
||||
<?php
|
||||
<?php
|
||||
echo "\n";
|
||||
} // end if
|
||||
} else {
|
||||
?>
|
||||
<td colspan="3" align="center">
|
||||
@@ -258,7 +267,9 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<?php
|
||||
}
|
||||
// Show Summary
|
||||
list($sum_formated,$unit) = format_byte_down($sum_size,3,1);
|
||||
if ($cfgShowStats) {
|
||||
list($sum_formated, $unit) = format_byte_down($sum_size, 3, 1);
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
@@ -275,13 +286,21 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<th align="center">
|
||||
<b>--</b>
|
||||
</td>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo "\n";
|
||||
?>
|
||||
<th align="right" nowrap="nowrap">
|
||||
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
||||
</th>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="11">
|
||||
<td colspan="<?php echo (($cfgShowStats) ? '11' : '10'); ?>">
|
||||
<img src="./images/arrow.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
|
||||
<i><?php echo $strWithChecked; ?></i>
|
||||
<input type="submit" name="submit_mult" value="<?php echo $strDrop; ?>" />
|
||||
|
@@ -89,7 +89,12 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<th> <?php echo ucfirst($strTable); ?> </th>
|
||||
<th><?php echo ucfirst($strRecords); ?></th>
|
||||
<th><?php echo ucfirst($strType); ?></th>
|
||||
<th><?php echo ucfirst($strSize); ?></th>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo '<th>' . ucfirst($strSize) . '</th>';
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</tr>
|
||||
<?php
|
||||
$i = $sum_entries = $sum_size = 0;
|
||||
@@ -116,7 +121,7 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
|
||||
if (isset($sts_data['Rows'])) {
|
||||
if ($mergetable == FALSE) {
|
||||
if ($nonisam == FALSE) {
|
||||
if ($cfgShowStats && $nonisam == FALSE) {
|
||||
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
||||
$sum_size += $tblsize;
|
||||
if ($tblsize > 0) {
|
||||
@@ -124,20 +129,18 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
} else {
|
||||
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
||||
}
|
||||
} else {
|
||||
} else if ($cfgShowStats) {
|
||||
$formated_size = ' - ';
|
||||
$unit = '';
|
||||
}
|
||||
if (isset($sts_data['Rows'])) {
|
||||
$sum_entries += $sts_data['Rows'];
|
||||
}
|
||||
$sum_entries += $sts_data['Rows'];
|
||||
}
|
||||
// MyISAM MERGE Table
|
||||
else if ($mergetable == TRUE) {
|
||||
else if ($cfgShowStats && $mergetable == TRUE) {
|
||||
$formated_size = ' - ';
|
||||
$unit = '';
|
||||
}
|
||||
else {
|
||||
else if ($cfgShowStats) {
|
||||
$formated_size = 'unknown';
|
||||
$unit = '';
|
||||
}
|
||||
@@ -155,10 +158,16 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<td nowrap="nowrap">
|
||||
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||
</td>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo $formated_size . ' ' . $unit . "\n"; ?>
|
||||
</td>
|
||||
<?php
|
||||
<?php
|
||||
echo "\n";
|
||||
} // end if
|
||||
} else {
|
||||
?>
|
||||
<td colspan="3" align="center">
|
||||
@@ -172,7 +181,9 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<?php
|
||||
}
|
||||
// Show Summary
|
||||
list($sum_formated,$unit) = format_byte_down($sum_size,3,1);
|
||||
if ($cfgShowStats) {
|
||||
list($sum_formated, $unit) = format_byte_down($sum_size, 3, 1);
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
@@ -185,9 +196,17 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
||||
<th align="center">
|
||||
<b>--</b>
|
||||
</td>
|
||||
<?php
|
||||
if ($cfgShowStats) {
|
||||
echo "\n";
|
||||
?>
|
||||
<th align="right" nowrap="nowrap">
|
||||
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
||||
</th>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
|
@@ -256,33 +256,34 @@ if ($index_count > 0) {
|
||||
*
|
||||
* staybyte - 9 June 2001
|
||||
*/
|
||||
$nonisam = FALSE;
|
||||
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
||||
$nonisam = TRUE;
|
||||
}
|
||||
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
// Gets some sizes
|
||||
$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($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']);
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
|
||||
} else {
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
}
|
||||
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
if ($num_rows > 0) {
|
||||
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
|
||||
if ($cfgShowStats) {
|
||||
$nonisam = FALSE;
|
||||
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
||||
$nonisam = TRUE;
|
||||
}
|
||||
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
// Gets some sizes
|
||||
$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($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']);
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
|
||||
} else {
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
}
|
||||
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
if ($num_rows > 0) {
|
||||
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
|
||||
}
|
||||
|
||||
// Displays them
|
||||
?>
|
||||
// Displays them
|
||||
?>
|
||||
<br /><br />
|
||||
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
@@ -301,20 +302,20 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
<td align="right" nowrap="nowrap"><?php echo $data_size; ?></td>
|
||||
<td><?php echo $data_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($index_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td><?php echo $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
if (isset($index_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td><?php echo $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $free_size; ?></td>
|
||||
@@ -325,20 +326,20 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
<td align="right" nowrap="nowrap"><?php echo $effect_size; ?></td>
|
||||
<td><?php echo $effect_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($tot_size) && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($tot_size) && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $tot_size; ?></td>
|
||||
<td><?php echo $tot_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -352,82 +353,83 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
<th><?php echo $strStatement; ?></th>
|
||||
<th align="center"><?php echo $strValue; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
if (isset($showtable['Row_format'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
$i = 0;
|
||||
if (isset($showtable['Row_format'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strFormat); ?></td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php
|
||||
echo ' ';
|
||||
if ($showtable['Row_format'] == 'Fixed') {
|
||||
echo $strFixed;
|
||||
} else if ($showtable['Row_format'] == 'Dynamic') {
|
||||
echo $strDynamic;
|
||||
} else {
|
||||
echo $showtable['Row_format'];
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
echo ' ';
|
||||
if ($showtable['Row_format'] == 'Fixed') {
|
||||
echo $strFixed;
|
||||
} else if ($showtable['Row_format'] == 'Dynamic') {
|
||||
echo $strDynamic;
|
||||
} else {
|
||||
echo $showtable['Row_format'];
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Rows'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Rows'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRows); ?></td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowLength); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowSize); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo "$avg_size $avg_unit\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Auto_increment'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Auto_increment'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strNext); ?> Autoindex</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
} // end if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE)
|
||||
<?php
|
||||
} // end if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE)
|
||||
} // end if ($cfgShowStats)
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -522,36 +522,37 @@ if ($index_count > 0) {
|
||||
* Displays Space usage and row statistics
|
||||
*/
|
||||
// BEGIN - Calc Table Space - staybyte - 9 June 2001
|
||||
$nonisam = FALSE;
|
||||
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
||||
$nonisam = TRUE;
|
||||
}
|
||||
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
// Gets some sizes
|
||||
$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($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']);
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
|
||||
} else {
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
}
|
||||
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
if ($num_rows > 0) {
|
||||
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
|
||||
if ($cfgShowStats) {
|
||||
$nonisam = FALSE;
|
||||
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
||||
$nonisam = TRUE;
|
||||
}
|
||||
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
// Gets some sizes
|
||||
$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($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']);
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']);
|
||||
} else {
|
||||
list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
}
|
||||
list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']);
|
||||
if ($num_rows > 0) {
|
||||
list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
|
||||
}
|
||||
|
||||
// Displays them
|
||||
if ($index_count > 0) {
|
||||
echo ' <td width="20"> </td>' . "\n";
|
||||
}
|
||||
?>
|
||||
// Displays them
|
||||
if ($index_count > 0) {
|
||||
echo ' <td width="20"> </td>' . "\n";
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Space usage -->
|
||||
<td valign="top">
|
||||
@@ -567,20 +568,20 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
<td align="right" nowrap="nowrap"><?php echo $data_size; ?></td>
|
||||
<td><?php echo $data_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
if (isset($index_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
if (isset($index_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strIndex); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $index_size; ?></td>
|
||||
<td><?php echo $index_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($free_size)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorTwo; ?>" style="color: #bb0000">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strOverhead); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $free_size; ?></td>
|
||||
@@ -591,31 +592,31 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
<td align="right" nowrap="nowrap"><?php echo $effect_size; ?></td>
|
||||
<td><?php echo $effect_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($tot_size) && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
<?php
|
||||
}
|
||||
if (isset($tot_size) && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo $cfgBgcolorOne; ?>">
|
||||
<td style="padding-right: 10px"><?php echo ucfirst($strTotal); ?></td>
|
||||
<td align="right" nowrap="nowrap"><?php echo $tot_size; ?></td>
|
||||
<td><?php echo $tot_unit; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
// Optimize link if overhead
|
||||
if (isset($free_size) && ($tbl_type == 'MYISAM' || $tbl_type == 'BDB')) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
// Optimize link if overhead
|
||||
if (isset($free_size) && ($tbl_type == 'MYISAM' || $tbl_type == 'BDB')) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" align="center">
|
||||
[<a href="sql.php3?<?php echo $url_query; ?>&pos=0&sql_query=<?php echo urlencode('OPTIMIZE TABLE ' . backquote($table)); ?>"><?php echo $strOptimizeTable; ?></a>]
|
||||
</td>
|
||||
<tr>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -628,80 +629,81 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||
<th><?php echo $strStatement; ?></th>
|
||||
<th align="center"><?php echo $strValue; ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
if (isset($showtable['Row_format'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
$i = 0;
|
||||
if (isset($showtable['Row_format'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strFormat); ?></td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php
|
||||
echo ' ';
|
||||
if ($showtable['Row_format'] == 'Fixed') {
|
||||
echo $strFixed;
|
||||
}
|
||||
else if ($showtable['Row_format'] == 'Dynamic') {
|
||||
echo $strDynamic;
|
||||
}
|
||||
else {
|
||||
echo $showtable['Row_format'];
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
echo ' ';
|
||||
if ($showtable['Row_format'] == 'Fixed') {
|
||||
echo $strFixed;
|
||||
}
|
||||
else if ($showtable['Row_format'] == 'Dynamic') {
|
||||
echo $strDynamic;
|
||||
}
|
||||
else {
|
||||
echo $showtable['Row_format'];
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Rows'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Rows'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRows); ?></td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Avg_row_length']) && $showtable['Avg_row_length'] > 0) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowLength); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Data_length']) && $showtable['Rows'] > 0 && $mergetable == FALSE) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strRowSize); ?> ø</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo "$avg_size $avg_unit\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Auto_increment'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
if (isset($showtable['Auto_increment'])) {
|
||||
echo "\n";
|
||||
?>
|
||||
<tr bgcolor="<?php echo ((++$i%2) ? $cfgBgcolorTwo : $cfgBgcolorOne); ?>">
|
||||
<td><?php echo ucfirst($strNext); ?> Autoindex</td>
|
||||
<td align="right" nowrap="nowrap">
|
||||
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
</table>
|
||||
</td>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
}
|
||||
// END - Calc Table Space
|
||||
echo "\n";
|
||||
|
Reference in New Issue
Block a user