Bug #80950 mysqldump warns about set-gtid-purged=OFF when not dumping data

Submitted: 4 Apr 2016 20:58 Modified: 25 Oct 2017 23:46
Reporter: monty solomon Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[4 Apr 2016 20:58] monty solomon
Description:
When executing a mysqldump command that does not dump any data it prints a warning about needing to pass --set-gtid-purged=OFF.

How to repeat:
mysqldump --single-transaction --no-data --databases test -r test.sql

Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don't want to restore GTIDs, pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events.

Suggested fix:
Don't print the warning when --no-data is used.
[25 Oct 2017 23:46] MySQL Verification Team
Thank you for the bug report.

miguel@tikal:~/dbs $ mysqldump -uroot -p --single-transaction --no-data --databases test -r test.sql
Enter password:
Warning: A partial dump from a server that has GTIDs will by default include the GTIDs of all transactions, even those that changed suppressed parts of the database. If you don't want to restore GTIDs, pass --set-gtid-purged=OFF. To make a complete dump, pass --all-databases --triggers --routines --events.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.