From: Tim Düsterhus Date: Wed, 9 Jun 2021 08:40:33 +0000 (+0200) Subject: Fix SearchEngineConvertInnoDbWorker when MySQL is not the active engine X-Git-Tag: 5.4.0_Beta_2~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5aef21f61ee527c857a5837ed65b45cd4aec04b6;p=GitHub%2FWoltLab%2FWCF.git Fix SearchEngineConvertInnoDbWorker when MySQL is not the active engine Fixes #4192 --- 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();