From b7091119c3f5f11073224c44f7199d31e729671e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 27 Aug 2021 11:41:15 +0200 Subject: [PATCH] Remove InnoDB check for search engine from SystemCheckPage 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 --- .../files/acp/templates/systemCheck.tpl | 12 ------- .../lib/acp/page/SystemCheckPage.class.php | 32 +------------------ wcfsetup/install/lang/de.xml | 6 ++-- wcfsetup/install/lang/en.xml | 6 ++-- 4 files changed, 7 insertions(+), 49 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/systemCheck.tpl b/wcfsetup/install/files/acp/templates/systemCheck.tpl index 5885be1563..bb431cce21 100644 --- a/wcfsetup/install/files/acp/templates/systemCheck.tpl +++ b/wcfsetup/install/files/acp/templates/systemCheck.tpl @@ -163,18 +163,6 @@ {lang}wcf.acp.systemCheck.mysql.foreignKeys.description{/lang} - - -
{lang}wcf.acp.systemCheck.mysql.searchEngine{/lang}
-
- {if $results[mysql][searchEngine][result]} - {@$statusOk} {lang}wcf.acp.systemCheck.pass{/lang} - {else} - {@$statusInsufficient} {lang}wcf.acp.systemCheck.mysql.searchEngine.incorrect{/lang} - {/if} - {lang}wcf.acp.systemCheck.mysql.searchEngine.description{/lang} -
-
diff --git a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php index f56f93b2bf..fc1ecdcbeb 100644 --- a/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php @@ -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; } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index fcb25b502d..481b360d6d 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2791,9 +2791,6 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen - - - InnoDB): {implode from=$results[mysql][searchEngine][incorrectTables] key=tableName item=engine glue=", "}{$tableName} ({$engine}){/implode}. {if LANGUAGE_USE_INFORMAL_VARIANT}Aktualisiere{else}Aktualisieren Sie{/if} die Anzeigen, um die Storage-Engine umzustellen.]]> @@ -5566,5 +5563,8 @@ Benachrichtigungen auf {PAGE_TITLE|lang + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 290ceaf709..d13d0b268f 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2721,9 +2721,6 @@ If you have already bought the licenses for the listed apps, th - - - InnoDB): {implode from=$results[mysql][searchEngine][incorrectTables] key=tableName item=engine glue=", "}{$tableName} ({$engine}){/implode}. Use the Rebuild Data Page to migrate to the correct storage engine.]]> @@ -5567,5 +5564,8 @@ your notifications on {PAGE_TITLE|langu + + + -- 2.20.1