From 5aef21f61ee527c857a5837ed65b45cd4aec04b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 9 Jun 2021 10:40:33 +0200 Subject: [PATCH] Fix SearchEngineConvertInnoDbWorker when MySQL is not the active engine Fixes #4192 --- .../system/worker/SearchEngineConvertInnoDbWorker.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/worker/SearchEngineConvertInnoDbWorker.class.php b/wcfsetup/install/files/lib/system/worker/SearchEngineConvertInnoDbWorker.class.php index 76775ff6e2..d3050da5c3 100644 --- a/wcfsetup/install/files/lib/system/worker/SearchEngineConvertInnoDbWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/SearchEngineConvertInnoDbWorker.class.php @@ -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(); -- 2.20.1