What happened?
Description
This bug: https://bugs.mysql.com/bug.php?id=109685
Is possibly the reason --single-transaction was removed from `craft db/backup'
But people using MariaDB are not impacted by this MySQL bug, yet the Craft code comparing versions and thinks MariaDB is, so the single-transaction is dropped from the backup.
Easy fix for anyone using MariaDB who wants to allow logging in while a backup is running is to add this into config/general.php after:
->backupOnUpdate((bool)App::env('BACKUP_ON_UPDATE'))
->backupCommand(function(\mikehaertl\shellcommand\Command $cmd) {
return $cmd->addArg('--single-transaction');
})
Steps to reproduce
- Strats a backup
craft db/backup
- Try to log in
Expected behavior
- Login completes almost as instantly as if no backup were running.
Actual behavior
- Login is delayed until backup finished (20mins later in our case on production!)
Craft CMS version
Craft Pro 4.18.0.1
PHP version
8.2.31
Operating system and version
Debian
Database type and version
MariaDB 10.11.15
Image driver and version
No response
Installed plugins and versions
-This may only be useful to a few people, but if they are alt lease we know a work-around, and if Craft can be modify to allow MariaDB to run with --single-transaction that would be excellent.
What happened?
Description
This bug: https://bugs.mysql.com/bug.php?id=109685
Is possibly the reason
--single-transactionwas removed from `craft db/backup'But people using MariaDB are not impacted by this MySQL bug, yet the Craft code comparing versions and thinks MariaDB is, so the
single-transactionis dropped from the backup.Easy fix for anyone using MariaDB who wants to allow logging in while a backup is running is to add this into config/general.php after:
->backupOnUpdate((bool)App::env('BACKUP_ON_UPDATE'))Steps to reproduce
craft db/backupExpected behavior
Actual behavior
Craft CMS version
Craft Pro 4.18.0.1
PHP version
8.2.31
Operating system and version
Debian
Database type and version
MariaDB 10.11.15
Image driver and version
No response
Installed plugins and versions
-This may only be useful to a few people, but if they are alt lease we know a work-around, and if Craft can be modify to allow MariaDB to run with
--single-transactionthat would be excellent.