Remove InnoDB check for search engine from SystemCheckPage
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 Aug 2021 09:41:15 +0000 (11:41 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 27 Aug 2021 09:49:53 +0000 (11:49 +0200)
Using MyISAM for the search engine does not actually break anything (in
contrast to using InnoDB before 5.4), thus this check is not essential and
single check will be run immediately before the upgrade to 5.5 in
update_com.woltlab.wcf_5.5_ensureInnoDbSearch.php

wcfsetup/install/files/acp/templates/systemCheck.tpl
wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 5885be15637f3cb3830bb1f2acf5c3e032eeb236..bb431cce2150f91ca26c93f8f384a33fa5cbd9c9 100644 (file)
                        <small>{lang}wcf.acp.systemCheck.mysql.foreignKeys.description{/lang}</small>
                </dd>
        </dl>
-       
-       <dl{if !$results[mysql][searchEngine][result]} class="formError"{/if}>
-               <dt>{lang}wcf.acp.systemCheck.mysql.searchEngine{/lang}</dt>
-               <dd>
-                       {if $results[mysql][searchEngine][result]}
-                               {@$statusOk} {lang}wcf.acp.systemCheck.pass{/lang}
-                       {else}
-                               {@$statusInsufficient} {lang}wcf.acp.systemCheck.mysql.searchEngine.incorrect{/lang}
-                       {/if}
-                       <small>{lang}wcf.acp.systemCheck.mysql.searchEngine.description{/lang}</small>
-               </dd>
-       </dl>
 </section>
 
 <section class="section">
index f56f93b2bf947c9254c38211c083da50405826b2..fc1ecdcbeb6c00e0b00e990af1b894abacc4c0da 100644 (file)
@@ -3,11 +3,9 @@
 namespace wcf\acp\page;
 
 use wcf\data\application\Application;
-use wcf\data\object\type\ObjectTypeCache;
 use wcf\page\AbstractPage;
 use wcf\system\database\util\PreparedStatementConditionBuilder;
 use wcf\system\exception\SystemException;
-use wcf\system\search\SearchIndexManager;
 use wcf\system\WCF;
 use wcf\util\FileUtil;
 
@@ -127,10 +125,6 @@ class SystemCheckPage extends AbstractPage
             'result' => false,
             'version' => '0.0.0',
             'foreignKeys' => false,
-            'searchEngine' => [
-                'result' => false,
-                'incorrectTables' => [],
-            ],
         ],
         'php' => [
             'gd' => [
@@ -271,31 +265,7 @@ class SystemCheckPage extends AbstractPage
 
         $this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() == $expectedForeignKeyCount;
 
-        // check search engine tables
-        $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.searchableObjectType');
-        $tableNames = [];
-        foreach ($objectTypes as $objectType) {
-            $tableNames[] = SearchIndexManager::getTableName($objectType->objectType);
-        }
-        $conditionBuilder = new PreparedStatementConditionBuilder(true);
-        $conditionBuilder->add('TABLE_NAME IN (?)', [$tableNames]);
-        $conditionBuilder->add('TABLE_SCHEMA = ?', [WCF::getDB()->getDatabaseName()]);
-
-        $sql = "SELECT  TABLE_NAME, ENGINE
-                FROM    INFORMATION_SCHEMA.TABLES
-                " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
-        $statement->execute($conditionBuilder->getParameters());
-
-        while ($row = $statement->fetchArray()) {
-            if ($row['ENGINE'] !== 'InnoDB') {
-                $this->results['mysql']['searchEngine']['incorrectTables'][$row['TABLE_NAME']] = $row['ENGINE'];
-            }
-        }
-
-        $this->results['mysql']['searchEngine']['result'] = empty($this->results['mysql']['searchEngine']['incorrectTables']);
-
-        if ($this->results['mysql']['result'] && $this->results['mysql']['innodb'] && $this->results['mysql']['foreignKeys'] && $this->results['mysql']['searchEngine']['result']) {
+        if ($this->results['mysql']['result'] && $this->results['mysql']['innodb'] && $this->results['mysql']['foreignKeys']) {
             $this->results['status']['mysql'] = true;
         }
     }
index fcb25b502d07aa62a8942fed9341b1a8c4ffe586..481b360d6dc60ccfe347c2828449ddc53ae383d4 100644 (file)
@@ -2791,9 +2791,6 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen
                <item name="wcf.acp.systemCheck.mysql.version.description"><![CDATA[Es wird mindestens MySQL {$mysqlVersions[mysql][5]} oder MySQL {$mysqlVersions[mysql][8]} bzw. MariaDB {$mysqlVersions[mariadb][10]} benötigt, grundsätzlich wird der Einsatz neuerer Version ausdrücklich empfohlen.]]></item>
                <item name="wcf.acp.systemCheck.mysql.foreignKeys"><![CDATA[Fremdschlüssel]]></item>
                <item name="wcf.acp.systemCheck.mysql.foreignKeys.description"><![CDATA[Fremdschlüssel werden mit der Installation in der Datenbank angelegt und werden für einen einwandfreien Betrieb benötigt.]]></item>
-               <item name="wcf.acp.systemCheck.mysql.searchEngine"><![CDATA[Suche]]></item>
-               <item name="wcf.acp.systemCheck.mysql.searchEngine.description"><![CDATA[Alle Tabellen, die für die Suche genutzt werden, müssen mit der Storage-Engine InnoDB betrieben werden.]]></item>
-               <item name="wcf.acp.systemCheck.mysql.searchEngine.incorrect"><![CDATA[Die folgenden Tabellen verwenden eine inkorrekte Storage-Engine (erwartete Storage-Engine: <code>InnoDB</code>): {implode from=$results[mysql][searchEngine][incorrectTables] key=tableName item=engine glue=", "}<code>{$tableName}</code> (<code>{$engine}</code>){/implode}. <a href="{link controller='RebuildData'}{/link}">{if LANGUAGE_USE_INFORMAL_VARIANT}Aktualisiere{else}Aktualisieren Sie{/if} die Anzeigen</a>, um die Storage-Engine umzustellen.]]></item>
                <item name="wcf.acp.systemCheck.php.extension"><![CDATA[Erweiterungen]]></item>
                <item name="wcf.acp.systemCheck.php.extension.description"><![CDATA[Die offiziellen Erweiterungen von PHP stellen zusätzliche Funktionen bereit, die für den Betrieb der Software notwendig sind.]]></item>
                <item name="wcf.acp.systemCheck.php.memoryLimit"><![CDATA[Verfügbarer Arbeitsspeicher („memory_limit“)]]></item>
@@ -5566,5 +5563,8 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|lang
        <item name="wcf.acp.option.profile_mail_use_captcha"/>
        <item name="wcf.acp.option.mail_smtp_starttls.may"/>
        <item name="wcf.acp.index.nonInnoDbSearch"/>
+       <item name="wcf.acp.systemCheck.mysql.searchEngine"/>
+       <item name="wcf.acp.systemCheck.mysql.searchEngine.description"/>
+       <item name="wcf.acp.systemCheck.mysql.searchEngine.incorrect"/>
 </delete>
 </language>
index 290ceaf709aa924e53bff03c3e85acf315ac37d4..d13d0b268f49bdad44a59be46cf5becadcc497de 100644 (file)
@@ -2721,9 +2721,6 @@ If you have <strong>already bought the licenses for the listed apps</strong>, th
                <item name="wcf.acp.systemCheck.mysql.version.description"><![CDATA[MySQL {$mysqlVersions[mysql][5]} or MySQL {$mysqlVersions[mysql][8]} or MariaDB {$mysqlVersions[mariadb][10]} are required at minimum, but it’s strongly recommended to always use the latest available version.]]></item>
                <item name="wcf.acp.systemCheck.mysql.foreignKeys"><![CDATA[Foreign Keys]]></item>
                <item name="wcf.acp.systemCheck.mysql.foreignKeys.description"><![CDATA[Foreign Keys are created with the installation and are required for the software to work.]]></item>
-               <item name="wcf.acp.systemCheck.mysql.searchEngine"><![CDATA[Search]]></item>
-               <item name="wcf.acp.systemCheck.mysql.searchEngine.description"><![CDATA[All tables used for the search must be configured with the InnoDB storage engine.]]></item>
-               <item name="wcf.acp.systemCheck.mysql.searchEngine.incorrect"><![CDATA[The following tables using an incorrect storage engine (expected storage engine <code>InnoDB</code>): {implode from=$results[mysql][searchEngine][incorrectTables] key=tableName item=engine glue=", "}<code>{$tableName}</code> (<code>{$engine}</code>){/implode}. Use the <a href="{link controller='RebuildData'}{/link}">Rebuild Data Page</a> to migrate to the correct storage engine.]]></item>
                <item name="wcf.acp.systemCheck.php.extension"><![CDATA[Extensions]]></item>
                <item name="wcf.acp.systemCheck.php.extension.description"><![CDATA[The official PHP extensions provide additional capabilities and features that are required for the software to work.]]></item>
                <item name="wcf.acp.systemCheck.php.memoryLimit"><![CDATA[Available Memory (“memory_limit”)]]></item>
@@ -5567,5 +5564,8 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|langu
        <item name="wcf.acp.option.profile_mail_use_captcha"/>
        <item name="wcf.acp.option.mail_smtp_starttls.may"/>
        <item name="wcf.acp.index.nonInnoDbSearch"/>
+       <item name="wcf.acp.systemCheck.mysql.searchEngine"/>
+       <item name="wcf.acp.systemCheck.mysql.searchEngine.description"/>
+       <item name="wcf.acp.systemCheck.mysql.searchEngine.incorrect"/>
 </delete>
 </language>