Fix SearchEngineConvertInnoDbWorker when MySQL is not the active engine
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Jun 2021 08:40:33 +0000 (10:40 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 9 Jun 2021 08:40:33 +0000 (10:40 +0200)
Fixes #4192

wcfsetup/install/files/lib/system/worker/SearchEngineConvertInnoDbWorker.class.php

index 76775ff6e277c0e4ba0e2b526336f35550ff9a8c..d3050da5c33b699c824944699dbd06bd1dff4d7d 100644 (file)
@@ -78,7 +78,9 @@ class SearchEngineConvertInnoDbWorker extends AbstractRebuildDataWorker
                 $table,
                 WCF::getDB()->getDatabaseName(),
             ]);
-            if ($checkStatement->fetchSingleColumn() !== 'innodb') {
+
+            $engine = $checkStatement->fetchSingleColumn();
+            if ($engine !== false && $engine !== 'innodb') {
                 $sql = "ALTER TABLE " . $table . " ENGINE = InnoDB";
                 $statement = WCF::getDB()->prepareStatement($sql);
                 $statement->execute();