diff options
author | Alexander M. Turek <me@derrabus.de> | 2005-03-27 03:34:26 +0400 |
---|---|---|
committer | Alexander M. Turek <me@derrabus.de> | 2005-03-27 03:34:26 +0400 |
commit | e2edcbccc50211752246dbb3d1f336b0166ea950 (patch) | |
tree | 5850a4840f434ae0eda3387153f09ccc63c9f8f4 | |
parent | 96fff6fe005efb4ca92aab0c79aa49b0d6617bb7 (diff) |
Caught possible devision by zero.
-rwxr-xr-x | ChangeLog | 3 | ||||
-rw-r--r-- | libraries/engines/innodb.lib.php | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-03-25 Alexander M. Turek <me@derrabus.de> + * libraries/engines/innodb.lib.php: Caught possible devision by zero. + 2005-03-25 Marc Delisle <lem9@users.sourceforge.net> * tbl_properties.inc.php: bug #1170255, undefined index: Field diff --git a/libraries/engines/innodb.lib.php b/libraries/engines/innodb.lib.php index 8466d60cca..2e6b56d368 100644 --- a/libraries/engines/innodb.lib.php +++ b/libraries/engines/innodb.lib.php @@ -165,13 +165,13 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine { . ' ' . $GLOBALS['strBufferReadMissesInPercent'] . ' ' . "\n" . ' </td>' . "\n" . ' <td align="right" bgcolor="' . $cfg['BgcolorTwo'] . '">' . "\n" - . ' ' . htmlspecialchars(number_format($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %' . "\n" + . ' ' . ($status['Innodb_buffer_pool_read_requests'] == 0 ? '---' : htmlspecialchars(number_format($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %') . "\n" . ' </td>' . "\n" . ' <td bgcolor="' . $cfg['BgcolorOne'] . '">' . "\n" . ' ' . $GLOBALS['strBufferWriteWaitsInPercent'] . ' ' . "\n" . ' </td>' . "\n" . ' <td align="right" bgcolor="' . $cfg['BgcolorTwo'] . '">' . "\n" - . ' ' . htmlspecialchars(number_format($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %' . "\n" + . ' ' . ($status['Innodb_buffer_pool_write_requests'] == 0 ? '---' : htmlspecialchars(number_format($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %') . "\n" . ' </td>' . "\n" . ' </tr>' . "\n" . ' </tbody>' . "\n" |