From cc2ab4bde6d797b8c9e5a8e25c3af1901f1f1d3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Mon, 1 Apr 2024 03:11:38 +0200 Subject: [PATCH 1/2] Test for delimiter after exported trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Krög --- test/classes/Plugins/Export/ExportSqlTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/classes/Plugins/Export/ExportSqlTest.php b/test/classes/Plugins/Export/ExportSqlTest.php index a9ae0955da77..e6aa176ef4b2 100644 --- a/test/classes/Plugins/Export/ExportSqlTest.php +++ b/test/classes/Plugins/Export/ExportSqlTest.php @@ -1061,7 +1061,7 @@ public function testExportStructure(): void $this->assertIsString($result); $this->assertStringContainsString('-- Triggers test_table', $result); $this->assertStringContainsString( - 'CREATE TRIGGER `test_trigger` AFTER INSERT ON `test_table` FOR EACH ROW BEGIN END', + "CREATE TRIGGER `test_trigger` AFTER INSERT ON `test_table` FOR EACH ROW BEGIN END\n$$", $result ); From ec2d9ba982429053ff7884f676c1661e62fa23cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Mon, 1 Apr 2024 03:23:21 +0200 Subject: [PATCH 2/2] Add missing $$ delimiter to exported triggers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Krög --- libraries/classes/Plugins/Export/ExportSql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/classes/Plugins/Export/ExportSql.php b/libraries/classes/Plugins/Export/ExportSql.php index cc38feb0c73c..e387d60c0973 100644 --- a/libraries/classes/Plugins/Export/ExportSql.php +++ b/libraries/classes/Plugins/Export/ExportSql.php @@ -2127,7 +2127,7 @@ public function exportStructure( $usedAlias = true; } - $triggerQuery .= 'DELIMITER ;' . $crlf; + $triggerQuery .= $delimiter . $crlf . 'DELIMITER ;' . $crlf; } // One warning per table.