Skip to content
Snippets Groups Projects
Commit 6b6edb6e authored by Georg Ringer's avatar Georg Ringer Committed by Christian Kuhn
Browse files

[TASK] Show explain selection in DB check only for Mysql

As the selection "explain" only works for Mysql, it should also only be
displayed then.

Resolves: #99512
Releases: main, 11.5
Change-Id: I93ddf86d1f63ef124feb2b72e86f32d8260ad99f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77395


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 9e5cda6b
Branches
Tags
No related merge requests found
......@@ -15,6 +15,7 @@
namespace TYPO3\CMS\Lowlevel\Controller;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Routing\UriBuilder;
......@@ -22,6 +23,7 @@ use TYPO3\CMS\Backend\Template\Components\ButtonBar;
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\ReferenceIndex;
use TYPO3\CMS\Core\Http\HtmlResponse;
use TYPO3\CMS\Core\Imaging\Icon;
......@@ -235,6 +237,13 @@ class DatabaseIntegrityController
],
'sword' => '',
];
// EXPLAIN is no ANSI SQL, for now this is only executed on mysql
$connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
if (!$connection->getDatabasePlatform() instanceof MySQLPlatform) {
unset($this->MOD_MENU['search_query_makeQuery']['explain']);
}
// CLEAN SETTINGS
$OLD_MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, [], $this->moduleName, 'ses');
$this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName, 'ses');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment