patch #683302: InnoDB status monitor

This commit is contained in:
Alexander M. Turek
2003-02-28 20:27:34 +00:00
parent d4cff7a588
commit e4ae264bf8
4 changed files with 54 additions and 13 deletions

View File

@@ -12,15 +12,17 @@ $Source$
2003-02-28 Alexander M. Turek <rabus@users.sourceforge.net>
* Documentation.html: Fixed a typo.
* server_privileges.php3: Fixed bug #691910.
* server_status.php3, lang/*.inc.php3: Patch #683302: InnoDB status monitor,
thanks to Jason Carlson (jjcarlson).
2003-02-28 Garvin Hicking <me@supergarv.de>
* config.inc.php3, header.inc.php3, queryframe.php3, querywindow.php3,
tbl_query_box.php3, libraries/common.lib.php3, libraries/config_import.lib.php3,
Documentation.html:
- Finetuneing for query window: Only three tabs, if DefaultTab
Documentation.html:
- Finetuneing for query window: Only three tabs, if DefaultTab
is not set to 'full'.
- Inserted nobr-Tags to make german translation for 'sql history' fit inside a tab.
- Improved windowsize of the query window (no a *lot* smaller, hope this will suit
- Improved windowsize of the query window (no a *lot* smaller, hope this will suit
Rabus ;).
- Made the textarea smaller (*1.25 instead of *2) for the window only.
- Fixed a bug when you changed from a table to a database on the left frame and the

View File

@@ -599,10 +599,12 @@ $strMIME_without = 'Kursiv dargestellte MIME-Typen besitzen keine untergliederte
$strMIME_description = 'Beschreibung';
$strMIME_nodescription = 'F<>r diese Umwandlung ist keine Beschreibung verf<72>gar.<br />Bitte fragen Sie den Authoren der Funktion namens %s.';
$strMIME_file = 'Dateiname';
$strInnodbStat = 'InnoDB-Status';
// To translate
$strTransformation_image_jpeg__plain = 'Takes an imagefile and outputs a link for it. First options argument is a possible prepended string like http://...';//to translate
$strTransformation_text_plain__formatted = 'Preserves original formatting of the field. No Escaping is done.';//to translate
$strTransformation_text_plain__unformatted = 'Displays HTML code as HTML entities. No HTML formatting is shown.';//to translate
$strTransformation_image_jpeg__link = 'Displays a link to this image (direct blob download, i.e.).';//to translate
$strTransformation_image_jpeg__inline = 'Displays an image directly in the table (uses wrapper, direct blob download, i.e.).';//to translate
$strInnodbStat = 'InnoDB Status'; //to translate
?>

View File

@@ -600,10 +600,12 @@ $strMIME_without = 'Kursiv dargestellte MIME-Typen besitzen keine untergliederte
$strMIME_description = 'Beschreibung';
$strMIME_nodescription = 'Für diese Umwandlung ist keine Beschreibung verfügar.<br />Bitte fragen Sie den Authoren der Funktion namens %s.';
$strMIME_file = 'Dateiname';
$strInnodbStat = 'InnoDB-Status';
// To translate
$strTransformation_image_jpeg__plain = 'Takes an imagefile and outputs a link for it. First options argument is a possible prepended string like http://...';//to translate
$strTransformation_text_plain__formatted = 'Preserves original formatting of the field. No Escaping is done.';//to translate
$strTransformation_text_plain__unformatted = 'Displays HTML code as HTML entities. No HTML formatting is shown.';//to translate
$strTransformation_image_jpeg__link = 'Displays a link to this image (direct blob download, i.e.).';//to translate
$strTransformation_image_jpeg__inline = 'Displays an image directly in the table (uses wrapper, direct blob download, i.e.).';//to translate
$strInnodbStat = 'InnoDB Status'; //to translate
?>

View File

@@ -15,6 +15,24 @@ require('./server_common.inc.php3');
require('./server_links.inc.php3');
/**
* InnoDB status
*/
if (!empty($innodbstatus)) {
echo '<h2>' . "\n"
. ' ' . $strInnodbStat . "\n"
. '</h2>' . "\n";
$sql_query = 'SHOW INNODB STATUS;';
$res = PMA_mysql_query($sql_query, $userlink) or PMA_mysqlDie(PMA_mysql_error($userlink), $sql_query);
$row = PMA_mysql_fetch_row($res);
echo '<pre>' . "\n"
. htmlspecialchars($row[0]) . "\n"
. '</pre>' . "\n";
mysql_free_result($res);
include('./footer.inc.php3');
exit;
}
/**
* Displays the sub-page heading
*/
@@ -201,18 +219,18 @@ if (!empty($serverStatus)) {
<th>&nbsp;<?php echo $strValue; ?>&nbsp;</th>
</tr>
<?php
$useBgcolorOne = TRUE;
$countRows = 0;
while (list($name, $value) = each($serverStatus)) {
$useBgcolorOne = TRUE;
$countRows = 0;
while (list($name, $value) = each($serverStatus)) {
?>
<tr>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo htmlspecialchars(str_replace('_', ' ', $name)); ?>&nbsp;</td>
<td bgcolor="<?php echo $useBgcolorOne ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; ?>">&nbsp;<?php echo htmlspecialchars($value); ?>&nbsp;</td>
</tr>
<?php
$useBgcolorOne = !$useBgcolorOne;
if (++$countRows == ceil(count($serverStatus) / 3) || $countRows == ceil(count($serverStatus) * 2 / 3)) {
$useBgcolorOne = TRUE;
$useBgcolorOne = !$useBgcolorOne;
if (++$countRows == ceil(count($serverStatus) / 3) || $countRows == ceil(count($serverStatus) * 2 / 3)) {
$useBgcolorOne = TRUE;
?>
</table>
</td>
@@ -223,9 +241,9 @@ while (list($name, $value) = each($serverStatus)) {
<th>&nbsp;<?php echo $strValue; ?>&nbsp;</th>
</tr>
<?php
}
}
}
unset($useBgcolorOne);
unset($useBgcolorOne);
?>
</table>
</td>
@@ -234,6 +252,23 @@ unset($useBgcolorOne);
</li>
<?php
}
$res = PMA_mysql_query('SHOW VARIABLES LIKE "have_innodb";', $userlink);
if ($res) {
$row = PMA_mysql_fetch_row($res);
if (!empty($row[1]) && $row[1] == 'YES') {
?>
<br />
<li>
<!-- InnoDB Status -->
<a href="./server_status.php3?<?php echo $url_query; ?>&amp;innodbstatus=1">
<b><?php echo $strInnodbStat; ?></b>
</a>
</li>
<?php
}
} else {
unset($res);
}
?>
</ul>