kellerkinderDE / shopware6-database-dump

Dump a Shopware 6 database for your local environments (and filter GDPR data)
MIT License
38 stars 11 forks source link

Not usable with `mysqldump` from mariadb or older MySQL version than 8.0 #1

Closed aragon999 closed 2 years ago

aragon999 commented 2 years ago

There seems to be a portability issue (not sure if this is something you want to address, feel free to close the PR if not).

When using mysqldump from the mariadb package, one cannot use the script since it exits with:

>> Creating structure dump...
mysqldump: unknown variable 'column-statistics=0'

Apparently the option --column-statistics=0 was only added for MySQL 8.0 and leads to an error if using some other version.

Currently the only not to complicated solution I could think of is to just configure this option in the ~/.my.cnf (or globally) for mysqldump and remove it from the script:

[mysqldump]
column-statistics=0
kleinmann commented 2 years ago

@aragon999 I added a check if the parameter is available in mysqldump in #3 . Would that also work for you? 🙂

aragon999 commented 2 years ago

@kleinmann thank you for the adjustment :-) I just commented in the PR, if that is also added, it works like a charm.

kleinmann commented 2 years ago

@aragon999 Done and done, thank you!