Bug #105872 mysqlpump should get the GTID information before unlock tables
Submitted: 12 Dec 2021 14:00 Modified: 13 Dec 2021 9:28
Reporter: Jinghua Lin Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: mysqlpump Command-line Client Severity:S3 (Non-critical)
Version:5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[12 Dec 2021 14:00] Jinghua Lin
Description:
I used mysqlpump(--single-transaction) to backup data, and I found that mysqlpump get the GTID information after 'UNLOCK TABLES' statement in general log.

This is different from the behavior of mysqldump(--single-transaction + --master-data).

I think 'SELECT @@GLOBAL.GTID_EXECUTED' should be executed between 'FLUSH TABLES WITH READ LOCK' and 'UNLOCK TABLES', so that the GTID and data are consistent.

How to repeat:
1.use mysqlpump(--single-transaction) to backup data
2.observe the general log
[13 Dec 2021 9:28] MySQL Verification Team
Hello John,

Thank you for the report.

regards,
Umesh