kellerkinderDE / shopware6-database-dump

Dump a Shopware 6 database for your local environments (and filter GDPR data)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

aragon999 opened this issue · comments

commented

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

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

commented

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

@aragon999 Done and done, thank you!