added the $cfgShowStats setting
This commit is contained in:
@@ -5,6 +5,14 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2001-09-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* tbl_properties.php3, db_details.php3, lang/*: start to merge new messages
|
* tbl_properties.php3, db_details.php3, lang/*: start to merge new messages
|
||||||
with parameters.
|
with parameters.
|
||||||
|
@@ -139,7 +139,12 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<th colspan="6"><?php echo ucfirst($strAction); ?></th>
|
<th colspan="6"><?php echo ucfirst($strAction); ?></th>
|
||||||
<th><?php echo ucfirst($strRecords); ?></th>
|
<th><?php echo ucfirst($strRecords); ?></th>
|
||||||
<th><?php echo ucfirst($strType); ?></th>
|
<th><?php echo ucfirst($strType); ?></th>
|
||||||
<th><?php echo ucfirst($strSize); ?></th>
|
<?php
|
||||||
|
if ($cfgShowStats) {
|
||||||
|
echo '<th>' . ucfirst($strSize) . '</th>';
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i = $sum_entries = $sum_size = 0;
|
$i = $sum_entries = $sum_size = 0;
|
||||||
@@ -201,7 +206,7 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
|
|
||||||
if (isset($sts_data['Rows'])) {
|
if (isset($sts_data['Rows'])) {
|
||||||
if ($mergetable == FALSE) {
|
if ($mergetable == FALSE) {
|
||||||
if ($nonisam == FALSE) {
|
if ($cfgShowStats && $nonisam == FALSE) {
|
||||||
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
||||||
$sum_size += $tblsize;
|
$sum_size += $tblsize;
|
||||||
if ($tblsize > 0) {
|
if ($tblsize > 0) {
|
||||||
@@ -209,20 +214,18 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
} else {
|
} else {
|
||||||
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else if ($cfgShowStats) {
|
||||||
$formated_size = ' - ';
|
$formated_size = ' - ';
|
||||||
$unit = '';
|
$unit = '';
|
||||||
}
|
}
|
||||||
if (isset($sts_data['Rows'])) {
|
|
||||||
$sum_entries += $sts_data['Rows'];
|
$sum_entries += $sts_data['Rows'];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// MyISAM MERGE Table
|
// MyISAM MERGE Table
|
||||||
else if ($mergetable == TRUE) {
|
else if ($cfgShowStats && $mergetable == TRUE) {
|
||||||
$formated_size = ' - ';
|
$formated_size = ' - ';
|
||||||
$unit = '';
|
$unit = '';
|
||||||
}
|
}
|
||||||
else {
|
else if ($cfgShowStats) {
|
||||||
$formated_size = 'unknown';
|
$formated_size = 'unknown';
|
||||||
$unit = '';
|
$unit = '';
|
||||||
}
|
}
|
||||||
@@ -240,11 +243,17 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<td nowrap="nowrap">
|
<td nowrap="nowrap">
|
||||||
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||||
</td>
|
</td>
|
||||||
|
<?php
|
||||||
|
if ($cfgShowStats) {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
<td align="right" nowrap="nowrap">
|
<td align="right" nowrap="nowrap">
|
||||||
|
|
||||||
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
|
<a href="tbl_properties.php3?<?php echo $url_query; ?>#showusage"><?php echo $formated_size . ' ' . $unit; ?></a>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
|
echo "\n";
|
||||||
|
} // end if
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<td colspan="3" align="center">
|
<td colspan="3" align="center">
|
||||||
@@ -258,7 +267,9 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
// Show Summary
|
// 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";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -275,13 +286,21 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<th align="center">
|
<th align="center">
|
||||||
<b>--</b>
|
<b>--</b>
|
||||||
</td>
|
</td>
|
||||||
|
<?php
|
||||||
|
if ($cfgShowStats) {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
<th align="right" nowrap="nowrap">
|
<th align="right" nowrap="nowrap">
|
||||||
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
||||||
</th>
|
</th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<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; ?>" />
|
<img src="./images/arrow.gif" border="0" width="38" height="22" alt="<?php echo $strWithChecked; ?>" />
|
||||||
<i><?php echo $strWithChecked; ?></i>
|
<i><?php echo $strWithChecked; ?></i>
|
||||||
<input type="submit" name="submit_mult" value="<?php echo $strDrop; ?>" />
|
<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($strTable); ?> </th>
|
||||||
<th><?php echo ucfirst($strRecords); ?></th>
|
<th><?php echo ucfirst($strRecords); ?></th>
|
||||||
<th><?php echo ucfirst($strType); ?></th>
|
<th><?php echo ucfirst($strType); ?></th>
|
||||||
<th><?php echo ucfirst($strSize); ?></th>
|
<?php
|
||||||
|
if ($cfgShowStats) {
|
||||||
|
echo '<th>' . ucfirst($strSize) . '</th>';
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$i = $sum_entries = $sum_size = 0;
|
$i = $sum_entries = $sum_size = 0;
|
||||||
@@ -116,7 +121,7 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
|
|
||||||
if (isset($sts_data['Rows'])) {
|
if (isset($sts_data['Rows'])) {
|
||||||
if ($mergetable == FALSE) {
|
if ($mergetable == FALSE) {
|
||||||
if ($nonisam == FALSE) {
|
if ($cfgShowStats && $nonisam == FALSE) {
|
||||||
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
$tblsize = $sts_data['Data_length'] + $sts_data['Index_length'];
|
||||||
$sum_size += $tblsize;
|
$sum_size += $tblsize;
|
||||||
if ($tblsize > 0) {
|
if ($tblsize > 0) {
|
||||||
@@ -124,20 +129,18 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
} else {
|
} else {
|
||||||
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
list($formated_size, $unit) = format_byte_down($tblsize, 3, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else if ($cfgShowStats) {
|
||||||
$formated_size = ' - ';
|
$formated_size = ' - ';
|
||||||
$unit = '';
|
$unit = '';
|
||||||
}
|
}
|
||||||
if (isset($sts_data['Rows'])) {
|
|
||||||
$sum_entries += $sts_data['Rows'];
|
$sum_entries += $sts_data['Rows'];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// MyISAM MERGE Table
|
// MyISAM MERGE Table
|
||||||
else if ($mergetable == TRUE) {
|
else if ($cfgShowStats && $mergetable == TRUE) {
|
||||||
$formated_size = ' - ';
|
$formated_size = ' - ';
|
||||||
$unit = '';
|
$unit = '';
|
||||||
}
|
}
|
||||||
else {
|
else if ($cfgShowStats) {
|
||||||
$formated_size = 'unknown';
|
$formated_size = 'unknown';
|
||||||
$unit = '';
|
$unit = '';
|
||||||
}
|
}
|
||||||
@@ -155,10 +158,16 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<td nowrap="nowrap">
|
<td nowrap="nowrap">
|
||||||
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
<?php echo (isset($sts_data['Type']) ? $sts_data['Type'] : ' '); ?>
|
||||||
</td>
|
</td>
|
||||||
|
<?php
|
||||||
|
if ($cfgShowStats) {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
<td align="right" nowrap="nowrap">
|
<td align="right" nowrap="nowrap">
|
||||||
<?php echo $formated_size . ' ' . $unit . "\n"; ?>
|
<?php echo $formated_size . ' ' . $unit . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
|
echo "\n";
|
||||||
|
} // end if
|
||||||
} else {
|
} else {
|
||||||
?>
|
?>
|
||||||
<td colspan="3" align="center">
|
<td colspan="3" align="center">
|
||||||
@@ -172,7 +181,9 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
// Show Summary
|
// 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";
|
echo "\n";
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -185,9 +196,17 @@ else if (MYSQL_INT_VERSION >= 32300) {
|
|||||||
<th align="center">
|
<th align="center">
|
||||||
<b>--</b>
|
<b>--</b>
|
||||||
</td>
|
</td>
|
||||||
|
<?php
|
||||||
|
if ($cfgShowStats) {
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
<th align="right" nowrap="nowrap">
|
<th align="right" nowrap="nowrap">
|
||||||
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
<b><?php echo $sum_formated . ' '. $unit; ?></b>
|
||||||
</th>
|
</th>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
echo "\n";
|
||||||
|
?>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
|
@@ -256,11 +256,12 @@ if ($index_count > 0) {
|
|||||||
*
|
*
|
||||||
* staybyte - 9 June 2001
|
* staybyte - 9 June 2001
|
||||||
*/
|
*/
|
||||||
$nonisam = FALSE;
|
if ($cfgShowStats) {
|
||||||
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
$nonisam = FALSE;
|
||||||
|
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
||||||
$nonisam = TRUE;
|
$nonisam = TRUE;
|
||||||
}
|
}
|
||||||
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||||
// Gets some sizes
|
// Gets some sizes
|
||||||
$mergetable = FALSE;
|
$mergetable = FALSE;
|
||||||
if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
|
if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
|
||||||
@@ -427,7 +428,8 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} // end if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE)
|
} // end if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE)
|
||||||
|
} // end if ($cfgShowStats)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -522,11 +522,12 @@ if ($index_count > 0) {
|
|||||||
* Displays Space usage and row statistics
|
* Displays Space usage and row statistics
|
||||||
*/
|
*/
|
||||||
// BEGIN - Calc Table Space - staybyte - 9 June 2001
|
// BEGIN - Calc Table Space - staybyte - 9 June 2001
|
||||||
$nonisam = FALSE;
|
if ($cfgShowStats) {
|
||||||
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
$nonisam = FALSE;
|
||||||
|
if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) {
|
||||||
$nonisam = TRUE;
|
$nonisam = TRUE;
|
||||||
}
|
}
|
||||||
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
||||||
// Gets some sizes
|
// Gets some sizes
|
||||||
$mergetable = FALSE;
|
$mergetable = FALSE;
|
||||||
if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
|
if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') {
|
||||||
@@ -702,6 +703,7 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) {
|
|||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// END - Calc Table Space
|
// END - Calc Table Space
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
Reference in New Issue
Block a user