Create all tables as InnoDB in MySQLDatabaseEditor::createTable()
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 23 Dec 2020 11:26:44 +0000 (12:26 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 23 Dec 2020 11:27:54 +0000 (12:27 +0100)
Resolves #3404.

wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php

index bfa81d7e401cc1fca7ce0380c94d5c3215b85e38..16f0fe1fed06d7be2a2c4fdf058c0a62104aab53 100644 (file)
@@ -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();
        }