Skip to content

Commit

Permalink
Bugfix/single transaction (#14928)
Browse files Browse the repository at this point in the history
* correct logic for database backup single-transaction (#14925)
* Changelog
* Simplify condition
* Changelog tweak

---------

Co-authored-by: Erin <[email protected]>
  • Loading branch information
timkelty and erinbit authored May 2, 2024
1 parent f479fc3 commit 19cc22f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Fixed a bug where disclosure menus weren’t releasing their `scroll` and `resize` event listeners on hide. ([#14911](https://github.com/craftcms/cms/pull/14911]), [#14510](https://github.com/craftcms/cms/issues/14510))
- Fixed a bug where MySQL backups weren’t restorable on certain environments. ([#14925](https://github.com/craftcms/cms/pull/14925))

## 4.9.0 - 2024-04-30

Expand Down
4 changes: 2 additions & 2 deletions src/db/mysql/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ public function getDefaultBackupCommand(?array $ignoreTables = null): string

// https://bugs.mysql.com/bug.php?id=109685
$useSingleTransaction =
($isMySQL5 && version_compare($serverVersion, '5.7.41', '>=')) ||
($isMySQL8 && version_compare($serverVersion, '8.0.32', '>='));
($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 19cc22f

Please sign in to comment.