From dae0d0108d0f5c16b92ac15e7a184a6ddeb859d4 Mon Sep 17 00:00:00 2001 From: Luana Spricigo Date: Mon, 5 Feb 2024 08:25:37 -0300 Subject: [PATCH 1/2] Fixed regex issue in function create_event, aligning it with the pattern used in other functions --- src/Ifsnop/Mysqldump/Mysqldump.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ifsnop/Mysqldump/Mysqldump.php b/src/Ifsnop/Mysqldump/Mysqldump.php index 0a2f2b7..ae528f8 100644 --- a/src/Ifsnop/Mysqldump/Mysqldump.php +++ b/src/Ifsnop/Mysqldump/Mysqldump.php @@ -2080,7 +2080,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 From 77d2b373f3633e2c9c9f7f34a482e034439eefbc Mon Sep 17 00:00:00 2001 From: Luana Spricigo Date: Fri, 20 Sep 2024 10:50:33 -0300 Subject: [PATCH 2/2] Added create event statement at test012 for definer validation --- tests/test012.src.sql | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test012.src.sql b/tests/test012.src.sql index 360a143..bd1223a 100644 --- a/tests/test012.src.sql +++ b/tests/test012.src.sql @@ -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; \ No newline at end of file