Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
--source include/master-slave.inc
|
|
CREATE TABLE t1 (a INT PRIMARY KEY); |
|
XA BEGIN 'x'; |
--error ER_DUP_ENTRY
|
INSERT INTO t1 VALUES (1),(1); |
XA END 'x'; |
XA PREPARE 'x'; |
XA COMMIT 'x'; |
|
--sync_slave_with_master
|
|
# Cleanup
|
--connection master
|
DROP TABLE t1; |
--source include/rpl_end.inc |
Binlog contains this:
10.5 d44a10f4 |
master-bin.000001 285 Binlog_checkpoint 1 329 master-bin.000001
|
master-bin.000001 329 Gtid 1 371 GTID 0-1-1
|
master-bin.000001 371 Query 1 473 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY)
|
master-bin.000001 473 Gtid 1 515 BEGIN GTID 0-1-2
|
master-bin.000001 515 Query 1 611 use `test`; INSERT INTO t1 VALUES (1),(1)
|
master-bin.000001 611 Query 1 684 COMMIT
|
master-bin.000001 684 Gtid 1 727 GTID 0-1-3
|
master-bin.000001 727 Query 1 815 XA COMMIT X'78',X'',1
|
So, slave SQL thread aborts with
Last_SQL_Errno 1397
|
Last_SQL_Error Error 'XAER_NOTA: Unknown XID' on query. Default database: 'test'. Query: 'XA COMMIT X'78',X'',1'
|
Reproducible on 10.5-10.6, with any binlog format and both transactional and non-transactional engines.
Naturally, with row format the INSERT part is different, and with InnoDB it is not written at all, but the orphan XA COMMIT is still added to the binary log and causes the replication failure.
Not reproducible on 10.4, no generated XA COMMIT there.
Attachments
Issue Links
- relates to
-
MDEV-742 LP:803649 - Xa recovery failed on client disconnection
- Closed
-
MDEV-29819 Shutdown unexpectedly executes XA ROLLBACK
- Open
-
MDEV-31830 Standalone XA COMMIT Binlogged on Replica if its Body Hits a Skipped Error
- Open
-
MDEV-23868 Replication stops while using XA with Myisam table
- Confirmed
-
MDEV-33921 Replication fails when XA transactions are used where the slave has replicate_do_db set and the client has touched a different database when running DML such as inserts.
- Closed