Skip to content

Commit baa48bf

Browse files
[8.x] Fix for #34592 artisan schema:dump error (#36698)
* It mysqldump errors because "set-gtid-purged" isn't a valid option retry without it. * Update MySqlSchemaState.php Co-authored-by: Matt Davis <Hamroll3> Co-authored-by: Taylor Otwell <[email protected]>
1 parent f201b81 commit baa48bf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Illuminate/Database/Schema/MySqlSchemaState.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ protected function executeDumpProcess(Process $process, $output, array $variable
149149
), $output, $variables);
150150
}
151151

152+
if (Str::contains($e->getMessage(), ['set-gtid-purged'])) {
153+
return $this->executeDumpProcess(Process::fromShellCommandLine(
154+
str_replace(' --set-gtid-purged=OFF', '', $process->getCommandLine())
155+
), $output, $variables);
156+
}
157+
152158
throw $e;
153159
}
154160

0 commit comments

Comments
 (0)