From 1668fda66d14ee0f1ededf94d27376c45e5caa1d Mon Sep 17 00:00:00 2001 From: Frank Naegler <frank.naegler@typo3.org> Date: Tue, 24 Aug 2021 13:47:28 +0200 Subject: [PATCH] [TASK] Remove obsolete LOCK TABLE check from install tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes the LOCK TABLE permission check from the PermissionsCheck class that is part of the installer. TYPO3 Core doesn't need the LOCK TABLE permission, hence the check can be removed. Resolves: #94978 Related: #78885 Releases: master, 10.4 Change-Id: I41a07583706fdb9d51bca5b1e74f64f56e38eebe Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70738 Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Stephan Großberndt <stephan.grossberndt@typo3.org> Tested-by: Jochen <rothjochen@gmail.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Stephan Großberndt <stephan.grossberndt@typo3.org> Reviewed-by: Jochen <rothjochen@gmail.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Classes/Controller/InstallerController.php | 1 - .../install/Classes/Database/PermissionsCheck.php | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/typo3/sysext/install/Classes/Controller/InstallerController.php b/typo3/sysext/install/Classes/Controller/InstallerController.php index e502e69fe7af..beee8bb2c152 100644 --- a/typo3/sysext/install/Classes/Controller/InstallerController.php +++ b/typo3/sysext/install/Classes/Controller/InstallerController.php @@ -747,7 +747,6 @@ class InstallerController ->checkAlter() ->checkIndex() ->checkCreateTemporaryTable() - ->checkLockTable() ->checkInsert() ->checkSelect() ->checkUpdate() diff --git a/typo3/sysext/install/Classes/Database/PermissionsCheck.php b/typo3/sysext/install/Classes/Database/PermissionsCheck.php index 79eb673c7d5f..78bd23f0ec03 100644 --- a/typo3/sysext/install/Classes/Database/PermissionsCheck.php +++ b/typo3/sysext/install/Classes/Database/PermissionsCheck.php @@ -109,20 +109,6 @@ class PermissionsCheck return $this; } - public function checkLockTable(): self - { - $this->checkCreateTable($this->testTableName); - $connection = $this->getConnection(); - try { - $connection->exec(sprintf('LOCK TABLES %s WRITE', $this->testTableName)); - $connection->exec('UNLOCK TABLES;'); - } catch (\Exception $e) { - $this->messages[] = 'The database user needs LOCK TABLE permission'; - } - $this->checkDropTable($this->testTableName); - return $this; - } - public function checkSelect(): self { $this->checkCreateTable($this->testTableName); -- GitLab