Skip to content

Commit d173a6f

Browse files
committed
fix skip-definer doesn't work for views with SQL SECURITY INVOKER. Fixes #243
1 parent a5ab2b7 commit d173a6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ifsnop/Mysqldump/Mysqldump.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ public function create_view($row)
19461946

19471947
if ($viewStmtReplaced = preg_replace(
19481948
'/^(CREATE(?:\s+ALGORITHM=(?:UNDEFINED|MERGE|TEMPTABLE))?)\s+('
1949-
.self::DEFINER_RE.'(?:\s+SQL SECURITY DEFINER|INVOKER)?)?\s+(VIEW .+)$/',
1949+
.self::DEFINER_RE.'(?:\s+SQL SECURITY (?:DEFINER|INVOKER))?)?\s+(VIEW .+)$/',
19501950
'/*!50001 \1 */'.PHP_EOL.$definerStr.'/*!50001 \3 */',
19511951
$viewStmt,
19521952
1

0 commit comments

Comments
 (0)