Closed nikitasol closed 3 months ago
MariaDB breaking database dumps in a patch release is wild 😞
Other relevant discussions/issues:
https://jira.mariadb.org/browse/MDEV-34183 https://github.com/ddev/ddev/issues/6249 https://github.com/wp-cli/db-command/issues/254
Just to add a few possible solutions:
tail -n +2
in between db export and db import so that the script may eliminate the first line (tested and works)And to confirm that rebuilding vm with updated MariaDB also works too.
For my local development (Docker-based) setup (Debian-based) I had to use curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash -s -- --mariadb-server-version="mariadb-11.2"
and installed the mariadb-client
package as a drop-in for mysql-client
. The 11.2
version is much newer and has the issue fixed. This also works on Ubuntu. Edit: Do not blindly use that command above on a production system.
https://discourse.roots.io/t/sync-script-fix-for-error-at-line-1-unknown-command/27734
If you're a sync script user landing on this issue, take a look at this solution from @joshuafredrickson:
https://discourse.roots.io/t/sync-script-fix-for-error-at-line-1-unknown-command/27734
We've also upgraded MariaDB in Trellis (https://github.com/roots/trellis/pull/1520) which will be in the next release
Version
1.22.0
What did you expect to happen?
Seamless sync between production/staging and development
What actually happens?
MariaDB 10.6.18 adds sandbox comman as per release notes and the new line at the top of the db export breaks syncing.
Steps to reproduce
Just re-provision production/staging so the new MariaDB is installed there and then try exporting/importing db either through the amazing sync.sh or manually.
The line which is added is this:
/*!999999\- enable the sandbox mode */
System info
No response
Log output
No response
Please confirm this isn't a support request.
No