Bug #112599 MySQLDump with 5.7.43 not recording GTID's
Submitted: 3 Oct 2023 13:22 Modified: 4 Oct 2023 10:45
Reporter: IGG t Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.7.43 OS:Windows
Assigned to: CPU Architecture:Any

[3 Oct 2023 13:22] IGG t
Description:
After upgrading to MySQL 5.7.43, it appears that mysqldump is no longer recognising the --set-gtid-purged flag

How to repeat:
Set up a database (in my case it was with version 5.7.33) with gtid_mode = on and generate a few gtid's.

run mysqldump as follows:
mysqldump.exe -hx -Px -ux -px --set-gtid-purged=on --single-transaction -A -E -R -q -c --max_allowed_packet=2G --result-file="dump_test_1.sql"

Then open the file. near the top is the line that sets the gtid value:
"SET @@GLOBAL.GTID_PURGED=' . . . . '"

Upgrade to mysql 5.7.43 and repeat. This time when opening the file the line for GTID's is missing.

Using an old MySQLDump with a new database works fine, but a new mysqldump with an old database doesn't work, suggesting the issue is with mysqldump.

Suggested fix:
mysqldump need to pick up the gtid's when requested.
[4 Oct 2023 10:45] MySQL Verification Team
HI Mr. t,

Thank you very much for your bug report.

However, version 5.7 is not maintained nor supported any more.

Please, let us know if you can repeat your problems with the latest 8.0.

Unsupported.