Skip to content

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed May 2, 2024
1 parent f2ebfb8 commit ecd955e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/db/mysql/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ public function getDefaultBackupCommand(?array $ignoreTables = null): string
$commandFromConfig = Craft::$app->getConfig()->getGeneral()->backupCommand;

// https://bugs.mysql.com/bug.php?id=109685
$useSingleTransaction = !(
($isMySQL5 && version_compare($serverVersion, '5.7.41', '>=')) ||
($isMySQL8 && version_compare($serverVersion, '8.0.32', '>='))
);
$useSingleTransaction =
($isMySQL5 && version_compare($serverVersion, '5.7.41', '<')) ||
($isMySQL8 && version_compare($serverVersion, '8.0.32', '<'));

if ($useSingleTransaction) {
$baseCommand->addArg('--single-transaction');
Expand Down

0 comments on commit ecd955e

Please sign in to comment.