Commit 445e9023 authored by anarcat's avatar anarcat

881496 by bgm - fix migration with MySQL views

parent 8d020fd3
...@@ -112,7 +112,7 @@ class provisionService_db_mysql extends provisionService_db_pdo { ...@@ -112,7 +112,7 @@ class provisionService_db_mysql extends provisionService_db_pdo {
// non-readable by the webserver. // non-readable by the webserver.
umask(0077); umask(0077);
// Mixed copy-paste of drush_shell_exec and provision_shell_exec. // Mixed copy-paste of drush_shell_exec and provision_shell_exec.
$cmd = sprintf('mysqldump --defaults-file=/dev/fd/3 -r%s/database.sql %s', escapeshellcmd(d()->site_path), escapeshellcmd(drush_get_option('db_name'))); $cmd = sprintf("mysqldump --defaults-file=/dev/fd/3 %s | sed 's|/\\*!50001 CREATE ALGORITHM=UNDEFINED \\*/|/\\*!50001 CREATE \\*/|g; s|/\\*!50017 DEFINER=`[^`]*`@`[^`]*` \\*/||g' | sed '/\\*!50013 DEFINER=.*/ d' > %s/database.sql", escapeshellcmd(drush_get_option('db_name')), escapeshellcmd(d()->site_path));
$success = $this->safe_shell_exec($cmd, drush_get_option('db_host'), urldecode(drush_get_option('db_user')), urldecode(drush_get_option('db_passwd'))); $success = $this->safe_shell_exec($cmd, drush_get_option('db_host'), urldecode(drush_get_option('db_user')), urldecode(drush_get_option('db_passwd')));
if (!$success && !drush_get_option('force', false)) { if (!$success && !drush_get_option('force', false)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment