From 3a36531a94d5279b4dc0329a966162981a0061a7 Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Mon, 22 Mar 2021 11:20:39 +0000 Subject: [PATCH 1/2] It mysqldump errors because "set-gtid-purged" isn't a valid option retry without it. --- src/Illuminate/Database/Schema/MySqlSchemaState.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Illuminate/Database/Schema/MySqlSchemaState.php b/src/Illuminate/Database/Schema/MySqlSchemaState.php index 2d46ebe32355..c38895bdb123 100644 --- a/src/Illuminate/Database/Schema/MySqlSchemaState.php +++ b/src/Illuminate/Database/Schema/MySqlSchemaState.php @@ -146,6 +146,11 @@ protected function executeDumpProcess(Process $process, $output, array $variable str_replace(' --column-statistics=0', '', $process->getCommandLine()) ), $output, $variables); } + if (Str::contains($e->getMessage(), ['set-gtid-purged'])) { + return $this->executeDumpProcess(Process::fromShellCommandLine( + str_replace(' --set-gtid-purged=OFF', '', $process->getCommandLine()) + ), $output, $variables); + } throw $e; } From 0b8284fd42c9caac509e507e74e7714d8825b303 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 22 Mar 2021 09:17:50 -0600 Subject: [PATCH 2/2] Update MySqlSchemaState.php --- src/Illuminate/Database/Schema/MySqlSchemaState.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Illuminate/Database/Schema/MySqlSchemaState.php b/src/Illuminate/Database/Schema/MySqlSchemaState.php index c38895bdb123..82efdf06a047 100644 --- a/src/Illuminate/Database/Schema/MySqlSchemaState.php +++ b/src/Illuminate/Database/Schema/MySqlSchemaState.php @@ -146,6 +146,7 @@ protected function executeDumpProcess(Process $process, $output, array $variable str_replace(' --column-statistics=0', '', $process->getCommandLine()) ), $output, $variables); } + if (Str::contains($e->getMessage(), ['set-gtid-purged'])) { return $this->executeDumpProcess(Process::fromShellCommandLine( str_replace(' --set-gtid-purged=OFF', '', $process->getCommandLine())