From 22f4c595ef1c8f109af489e6fe19bb66b0f98a5c Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Tue, 8 Mar 2022 10:59:04 +0100 Subject: [PATCH 1/2] BUGFIX: Don't use transactions to change db character set Fixes: #2724 --- Neos.Flow/Classes/Command/DatabaseCommandController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Neos.Flow/Classes/Command/DatabaseCommandController.php b/Neos.Flow/Classes/Command/DatabaseCommandController.php index cfd59b6a07..4dd455c911 100644 --- a/Neos.Flow/Classes/Command/DatabaseCommandController.php +++ b/Neos.Flow/Classes/Command/DatabaseCommandController.php @@ -134,18 +134,14 @@ protected function convertToCharacterSetAndCollation(string $characterSet, strin if ($outputPathAndFilename === null) { try { - $this->connection->beginTransaction(); foreach ($statements as $statement) { if ($verbose) { $this->outputLine($statement); } $this->connection->exec($statement); } - $this->connection->commit(); } catch (\Exception $exception) { - $this->connection->rollBack(); - $this->outputLine($exception->getMessage()); - $this->outputLine('[ERROR] The transaction was rolled back.'); + $this->outputLine([ERROR] %s', [$exception->getMessage()]); } } else { file_put_contents($outputPathAndFilename, implode(';' . PHP_EOL, $statements) . ';'); From 9db107c5f08200618168dffbdf8076fe827cdde4 Mon Sep 17 00:00:00 2001 From: Bastian Waidelich Date: Tue, 8 Mar 2022 10:59:51 +0100 Subject: [PATCH 2/2] Update DatabaseCommandController.php --- Neos.Flow/Classes/Command/DatabaseCommandController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.Flow/Classes/Command/DatabaseCommandController.php b/Neos.Flow/Classes/Command/DatabaseCommandController.php index 4dd455c911..1a9e435de8 100644 --- a/Neos.Flow/Classes/Command/DatabaseCommandController.php +++ b/Neos.Flow/Classes/Command/DatabaseCommandController.php @@ -141,7 +141,7 @@ protected function convertToCharacterSetAndCollation(string $characterSet, strin $this->connection->exec($statement); } } catch (\Exception $exception) { - $this->outputLine([ERROR] %s', [$exception->getMessage()]); + $this->outputLine('[ERROR] %s', [$exception->getMessage()]); } } else { file_put_contents($outputPathAndFilename, implode(';' . PHP_EOL, $statements) . ';');