From e2edcbccc50211752246dbb3d1f336b0166ea950 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sat, 26 Mar 2005 23:34:26 +0000 Subject: [PATCH] Caught possible devision by zero. --- ChangeLog | 3 +++ libraries/engines/innodb.lib.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03555e601..4d121a335 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-03-25 Alexander M. Turek + * libraries/engines/innodb.lib.php: Caught possible devision by zero. + 2005-03-25 Marc Delisle * tbl_properties.inc.php: bug #1170255, undefined index: Field diff --git a/libraries/engines/innodb.lib.php b/libraries/engines/innodb.lib.php index 8466d60cc..2e6b56d36 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" . ' ' . "\n" . ' ' . "\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" . ' ' . "\n" . ' ' . "\n" . '  ' . $GLOBALS['strBufferWriteWaitsInPercent'] . ' ' . "\n" . ' ' . "\n" . ' ' . "\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" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n"