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

dump: use --source-data based on version #933

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

dveeden
Copy link
Collaborator

@dveeden dveeden commented Oct 26, 2024

Use mysqldump --source-data ... instead of mysqldump --master-data ... based on the version of mysqldump.

Related

@dveeden
Copy link
Collaborator Author

dveeden commented Oct 26, 2024

This might not work if mariadb-dump is used instead of mysqldump... however it would then likely fail to extract the version and an empty version string would still cause --master-data to be called.

In the future MariaDB might remove mysqldump...

dvaneeden@dve-carbon:~$ ./opt/mysql/11.2.2/bin/mariadb-dump --help | head -1
./opt/mysql/11.2.2/bin/mariadb-dump from 11.2.2-MariaDB, client 10.19 for linux-systemd (x86_64)
dvaneeden@dve-carbon:~$ ./opt/mysql/11.2.2/bin/mysqldump --help | head -1
./opt/mysql/11.2.2/bin/mysqldump: Deprecated program name. It will be removed in a future release, use '/home/dvaneeden/opt/mysql/11.2.2/bin/mariadb-dump' instead
./opt/mysql/11.2.2/bin/mysqldump from 11.2.2-MariaDB, client 10.19 for linux-systemd (x86_64)
dvaneeden@dve-carbon:~$ 

If a system has both MySQL and MariaDB we can still use mysqldump. If a system only has mariadb-dump and no mysqldump we can call the former if the latter fails to exec. We would then have to update the regexps.

@dveeden dveeden mentioned this pull request Oct 27, 2024
10 tasks
@lance6716 lance6716 merged commit 5ad36fa into go-mysql-org:master Oct 28, 2024
13 checks passed
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.

2 participants