Bug #99625 | Replaying Binary log returns ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID | ||
---|---|---|---|
Submitted: | 19 May 2020 7:33 | Modified: | 19 May 2020 12:23 |
Reporter: | Marc Reilly | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: XA transactions | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Linux |
Assigned to: | CPU Architecture: | x86 | |
Tags: | ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID, gtid_next, xa |
[19 May 2020 7:33]
Marc Reilly
[19 May 2020 12:23]
MySQL Verification Team
Hi Mr. Reilly, Thank you for your bug report. I have managed to repeat this bug in the latest 5.7, but not in the latest 8.0. Hence, this is only 5.7-only bug. It is up to Development to decide whether to fix it or not in mysql-5.7. Verified as reported.
[19 May 2020 21:14]
Abdel-Mawla Gharieb
The issue is also reproducible when GTID is enabled. I tried same steps after creating a DB instance with the following parameters in the my.cnf: log-error=/var/log/mysql/error/mysql.err log-bin=/var/log/mysql/binlog/mysql-bin binlog_format = 'ROW' enforce_gtid_consistency = 'ON' gtid-mode = 'ON' sql_mode='NO_ENGINE_SUBSTITUTION' Created same XA transactions as Marc described above and got the following error when loading the binary log: ERROR 1790 (HY000) at line 90: @@SESSION.GTID_NEXT cannot be changed by a client that owns a GTID. The client owns e37a0ddb-9a0d-11ea-b65a-063704527866:10. Ownership is released on COMMIT or ROLLBACK. In case GTID is DISABLED, skipping the GTIDs when loading the binary logs can workaround the issue. mysqlbinlog can skip GTIDs when loading binary logs by adding the following lines in my.cnf: [mysqlbinlog] skip-gtids Again, this is only viable if GTID is DISABLED.
[20 May 2020 12:22]
MySQL Verification Team
Thank you, Mr. Garieb.