From 308e32b7d9b82a237617362ef781e1e7f13138d0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 28 Jun 2013 16:53:29 +0200 Subject: [PATCH] Fixed check for InnoDB support ("have_innodb" was removed in 5.6) --- .../install/files/lib/system/WCFSetup.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 8dbd28f1cb..53c5caafdd 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -631,11 +631,18 @@ class WCFSetup extends WCF { } // check innodb support if ($dbClass == 'wcf\system\database\MySQLDatabase') { - $sql = "SHOW VARIABLES WHERE Variable_name = 'have_innodb'"; + $sql = "SHOW ENGINES"; $statement = $db->prepareStatement($sql); $statement->execute(); - $row = $statement->fetchArray(); - if ($row === false || $row['Value'] != 'YES') { + $hasInnoDB = false; + while ($row = $statement->fetchArray()) { + if ($row['Engine'] == 'InnoDB' && in_array($row['Support'], array('DEFAULT', 'YES'))) { + $hasInnoDB = true; + break; + } + } + + if (!$hasInnoDB) { throw new SystemException("Support for InnoDB is missing."); } } -- 2.20.1