From 5ae050ccd21e5b942768172658f68f4b50a50b43 Mon Sep 17 00:00:00 2001 From: David M Date: Sat, 14 Jan 2006 04:52:41 +0000 Subject: [PATCH] - InnoDB would not calculate the total size of a table.. this is now fixed.. - Applied regex majic to the stuff that checks MySQL version. Faster regex and easier to manage. git-svn-id: file:///svn/phpbb/trunk@5450 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 08f90fab83..4d2090d5b8 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2435,9 +2435,9 @@ function get_database_size() { $version = $row['mysql_version']; - if (preg_match('#^(3\.23|4\.|5\.)#', $version)) + if (preg_match('#(3\.23|[45]\.)#', $version)) { - $db_name = (preg_match('#^(3\.23\.[6-9])|(3\.23\.[1-9][1-9])|(4\.)|(5\.)#', $version)) ? "`{$db->dbname}`" : $db->dbname; + $db_name = (preg_match('#^(?:3\.23\.(?:[6-9]|[1-9]{2}))|[45]\.#', $version)) ? "`{$db->dbname}`" : $db->dbname; $sql = "SHOW TABLE STATUS FROM " . $db_name; @@ -2446,7 +2446,7 @@ function get_database_size() $dbsize = 0; while ($row = $db->sql_fetchrow($result)) { - if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && $row['Engine'] == 'MyISAM')) + if ((isset($row['Type']) && $row['Type'] != 'MRG_MyISAM') || (isset($row['Engine']) && ($row['Engine'] == 'MyISAM' || $row['Engine'] == 'InnoDB'))) { if ($table_prefix != '') {