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. 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 );