Skip to content

Commit

Permalink
Fix #18495 - Exporting procedures and triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
williamdes committed Nov 16, 2023
1 parent b8f7d3f commit 38a4328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/classes/Plugins/Export/ExportSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ protected function exportRoutineSQL(
);
if (! empty($createQuery) && $cfg['Export']['remove_definer_from_definitions']) {
// Remove definer clause from routine definitions
$parser = new Parser($createQuery);
$parser = new Parser('DELIMITER ' . $delimiter . $crlf . $createQuery);
$statement = $parser->statements[0];
$statement->options->remove('DEFINER');
$createQuery = $statement->build();
Expand Down Expand Up @@ -1024,7 +1024,7 @@ public function exportEvents($db): bool
$eventDef = $dbi->getDefinition($db, 'EVENT', $eventName);
if (! empty($eventDef) && $cfg['Export']['remove_definer_from_definitions']) {
// remove definer clause from the event definition
$parser = new Parser($eventDef);
$parser = new Parser('DELIMITER ' . $delimiter . $crlf . $eventDef);
$statement = $parser->statements[0];
$statement->options->remove('DEFINER');
$eventDef = $statement->build();
Expand Down

0 comments on commit 38a4328

Please sign in to comment.