Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Remove --column-statistics for MariaDB schema dump #34442

Merged
merged 1 commit into from
Sep 21, 2020
Merged

[8.x] Remove --column-statistics for MariaDB schema dump #34442

merged 1 commit into from
Sep 21, 2020

Conversation

Xenonym
Copy link
Contributor

@Xenonym Xenonym commented Sep 21, 2020

Fixes #32552.

When php artisan schema:dump is run with a MariaDB connection, the warning message

mysqldump: unknown variable 'column-statistics=0'

appears, but the dump is otherwise successful.

This is because the --column-statistics flag is MySQL specific, and does not exist in MariaDB's version of mysqldump.

Let's remove the --column-statistics flag from the schema:dump command when it is run against a MariaDB connection.

There should be no issues with removing the flag in MariaDB as the flag has no effect otherwise and schema:dump still functions correctly with MariaDB even with the flag removed.

When `php artisan schema:dump` is run with a MariaDB connection, the
warning message `mysqldump: unknown variable 'column-statistics=0'`
appears, but the dump is otherwise successful.

This is because the `--column-statistics` flag is MySQL specific, and
does not exist in MariaDB's version of `mysqldump`.

Let's remove the `--column-statistics` flag from the `schema:dump`
command when it is run against a MariaDB connection.

There should be no issues with removing the flag in MariaDB as the flag
has no effect otherwise and `schema:dump` still functions correctly
with MariaDB even with the flag removed.
@taylorotwell taylorotwell merged commit f4e4bca into laravel:8.x Sep 21, 2020
@iKlsR
Copy link

iKlsR commented Sep 21, 2020

@Xenonym What about --set-gtid-purged=OFF as well? schema:dump still breaking for me with this patch using https://hub.docker.com/r/bitnami/mysql/tags as the mysqldump uses mariadb https://stackoverflow.com/questions/48876519/mysqldump-stopped-working-with-conversion-to-mariadb-set-gtid-purged-off-issue

@GrahamCampbell GrahamCampbell changed the title Remove --column-statistics for MariaDB schema dump [8.x] Remove --column-statistics for MariaDB schema dump Sep 21, 2020
@Xenonym Xenonym deleted the fix/dump-mariadb-column-statistics branch September 22, 2020 02:10
@Xenonym
Copy link
Contributor Author

Xenonym commented Sep 22, 2020

@iKlsR this PR (and the associated issue) was about MariaDB. Your problem seems to be with an older MySQL version. You should probably open a new issue for older MySQL server versions.

@iKlsR
Copy link

iKlsR commented Sep 22, 2020

Hmm. From prior closed issues seems like it's a works on my machine 🤷‍♂️ case so when it pops up again or someone gets around to it one day I guess. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[8.x] Schema Dump (MariaDB)
3 participants