trellis icon indicating copy to clipboard operation
trellis copied to clipboard

MariaDB 10.6.18 release requires action

Open nikitasol opened this issue 1 year ago • 3 comments
trafficstars

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

nikitasol avatar May 28 '24 20:05 nikitasol

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

retlehs avatar May 28 '24 21:05 retlehs

Just to add a few possible solutions:

  • if you use sync.sh (or some other shell script) add tail -n +2 in between db export and db import so that the script may eliminate the first line (tested and works)
  • update vm to latest mariadb version (haven't tested yet, but should work)

nikitasol avatar May 28 '24 21:05 nikitasol

And to confirm that rebuilding vm with updated MariaDB also works too.

nikitasol avatar May 28 '24 21:05 nikitasol

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

strarsis avatar Jul 19 '24 21:07 strarsis

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

retlehs avatar Aug 11 '24 17:08 retlehs