lando / mariadb

The Official MariaDB Lando Plugin
https://docs.lando.dev/mariadb
GNU General Public License v3.0
0 stars 7 forks source link

Support MariaDB 11.4 #59

Closed mortona42 closed 1 month ago

mortona42 commented 3 months ago

11.4 is available for docker.

If a database is imported using drush sql-sync, it breaks when the server uses a later version of mariadb. https://mariadb.org/mariadb-dump-file-compatibility-change/

I think the easiest fix is to be able to set your local version to the save as the server, but our options are currently limited to releases that don't contain the fix.

More links: https://mariadb.org/mariadb-dump-file-compatibility-change/ https://jira.mariadb.org/browse/MDEV-34203 https://ddev.com/blog/mariadb-dump-breaking-change/

AaronFeledy commented 2 months ago

@mortona42 If you're up for submitting a PR for this, it's just a matter of updating a couple of values in mariadb.js. You'd need to add 11.4 to the supported values and add bitnami/mariadb:11.4.2-debian-12-r2 to pinPairs.

mortona42 commented 2 months ago

I was able to test by cloning the repo into my plugin directory and changing the path in the drupal plugin to the local version.

It seems to be working, but the problem I was trying to resolve is not fixed.

On drush sql-sync, it shows this error:

  The command "/app/vendor/bin/drush sql:query --strict=0 --file=/tmp/mysite_20240805_221136.sql.gz --file-delete --uri=https://asap.lndo.site" failed.  

  Exit Code: 1(General error)                                                                                                                            

  Working directory:                                                                                                                                     

  Output:                                                                                                                                                
  ================                                                                                                                                       

  Error Output:                                                                                                                                          
  ================                                                                                                                                       

  In SqlCommands.php line 183:                                                                                                                           

    Query failed. Rerun with --debug to see any error message. ERROR at line 1: Unknown command '\-'.  

The line it's choking on is /*!999999\- enable the sandbox mode */. I thought that would be fixed if it's using the cli client from 11.4. Does something else need to change?