Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Ifsnop/Mysqldump/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ public function create_event($row)
$definerStr = $this->dumpSettings['skip-definer'] ? '' : '/*!50117 \2*/ ';

if ($eventStmtReplaced = preg_replace(
'/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(EVENT .*)$/',
'/^(CREATE)\s+('.self::DEFINER_RE.')?\s+(EVENT\s.*)$/s',
'/*!50106 \1*/ '.$definerStr.'/*!50106 \3 */',
$eventStmt,
1
Expand Down
8 changes: 8 additions & 0 deletions tests/test012.src.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@ BEGIN
SELECT * FROM test012;
END ;;
DELIMITER ;

CREATE EVENT `test012_event`
ON SCHEDULE EVERY 1 DAY
ON COMPLETION PRESERVE ENABLE
DO begin

select 1;
end;