<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">
<?php
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;
'result' => false,
'version' => '0.0.0',
'foreignKeys' => false,
+ 'searchEngine' => [
+ 'result' => false,
+ 'incorrectTables' => []
+ ],
],
'php' => [
'extension' => [],
$this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() === $expectedForeignKeyCount;
- if ($this->results['mysql']['result'] && $this->results['mysql']['innodb'] && $this->results['mysql']['foreignKeys']) {
+ // 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'] !== 'MyISAM') {
+ $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']) {
$this->results['status']['mysql'] = true;
}
}
<item name="wcf.acp.systemCheck.mysql.version.description"><![CDATA[Es wird mindestens MySQL {$mysqlVersions[mysql]} bzw. MariaDB {$mysqlVersions[mariadb][5]} oder 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 MyISAM betrieben werden.]]></item>
+ <item name="wcf.acp.systemCheck.mysql.searchEngine.incorrect"><![CDATA[Die folgenden Tabellen verwenden eine inkorrekte Storage-Engine (erwartete Storage-Engine: <code>MyISAM</code>): {implode from=$results[mysql][searchEngine][incorrectTables] key=tableName item=engine glue=", "}<code>{$tableName}</code> (<code>{$engine}</code>){/implode}.]]></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>
<item name="wcf.acp.systemCheck.mysql.version.description"><![CDATA[MySQL {$mysqlVersions[mysql]} or MariaDB {$mysqlVersions[mariadb][5]} 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 MyISAM storage engine.]]></item>
+ <item name="wcf.acp.systemCheck.mysql.searchEngine.incorrect"><![CDATA[The following tables using an incorrect storage engine (expected storage engine <code>MyISAM</code>): {implode from=$results[mysql][searchEngine][incorrectTables] key=tableName item=engine glue=", "}<code>{$tableName}</code> (<code>{$engine}</code>){/implode}.]]></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>