From: Tim Düsterhus Date: Wed, 23 Dec 2020 11:26:44 +0000 (+0100) Subject: Create all tables as InnoDB in MySQLDatabaseEditor::createTable() X-Git-Tag: 5.4.0_Alpha_1~509^2^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ba16fd2b24db479bf5d0d73bd51fdc711302dfbd;hp=8e01769e38ab684406021468679739c8f0e00741;p=GitHub%2FWoltLab%2FWCF.git Create all tables as InnoDB in MySQLDatabaseEditor::createTable() Resolves #3404. --- diff --git a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php index bfa81d7e40..16f0fe1fed 100644 --- a/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php +++ b/wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php @@ -215,11 +215,9 @@ class MySQLDatabaseEditor extends DatabaseEditor { } // build index definition - $hasFulltextIndex = false; foreach ($indices as $index) { if (!empty($indexDefinition)) $indexDefinition .= ','; $indexDefinition .= $this->buildIndexDefinition($index['name'], $index['data']); - if ($index['data']['type'] == 'FULLTEXT') $hasFulltextIndex = true; } // create table @@ -227,7 +225,7 @@ class MySQLDatabaseEditor extends DatabaseEditor { ".$columnDefinition." ".(!empty($indexDefinition) ? ',' : '')." ".$indexDefinition." - ) ENGINE=".($hasFulltextIndex ? 'MyISAM' : 'InnoDB')." DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci"; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci"; $statement = $this->dbObj->prepareStatement($sql); $statement->execute(); }