Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5, 10.6, 10.11, 11.2(EOL), 11.4, 11.6(EOL)
-
None
Description
--source include/have_innodb.inc
|
--source include/have_binlog_format_mixed.inc
|
--source include/master-slave.inc
|
|
CREATE TEMPORARY TABLE tmp (a INT) ENGINE=MyISAM; |
XA START 'x'; |
--error ER_DUP_FIELDNAME
|
CREATE OR REPLACE TEMPORARY TABLE tmp ENGINE=MyISAM IGNORE AS SELECT 1, 1; |
XA END 'x'; |
XA PREPARE 'x'; |
XA COMMIT 'x'; |
|
XA START 'x'; |
CREATE OR REPLACE TEMPORARY TABLE tmp ENGINE=MyISAM AS SELECT 1; |
XA END 'x'; |
XA PREPARE 'x'; |
XA COMMIT 'x'; |
|
--sync_slave_with_master
|
|
# Cleanup
|
--connection master
|
# Normally not necessary, but in this case MTR otherwise complains |
# about "Slave_open_temp_tables 1" |
DROP TEMPORARY TABLE IF EXISTS tmp; |
--source include/rpl_end.inc |
10.5 5673cbe0941e105eb73b5ecf651a529f8e717b52 |
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 486 use `test`; CREATE TEMPORARY TABLE tmp (a INT) ENGINE=MyISAM
|
master-bin.000001 486 Gtid 1 529 XA START X'78',X'',1 GTID 0-1-2
|
master-bin.000001 529 Query 1 689 DROP TEMPORARY TABLE IF EXISTS `test`.`tmp`/* Generated to handle failed CREATE OR REPLACE */
|
master-bin.000001 689 Query 1 774 XA END X'78',X'',1
|
master-bin.000001 774 XA_prepare 1 811 XA PREPARE X'78',X'',1
|
master-bin.000001 811 Gtid 1 853 BEGIN GTID 0-1-3
|
master-bin.000001 853 Query 1 983 use `test`; CREATE OR REPLACE TEMPORARY TABLE tmp ENGINE=MyISAM AS SELECT 1
|
master-bin.000001 983 Query 1 1056 COMMIT
|
master-bin.000001 1056 Gtid 1 1099 XA START X'78',X'',1 GTID 0-1-4
|
master-bin.000001 1099 Query 1 1184 XA END X'78',X'',1
|
master-bin.000001 1184 XA_prepare 1 1221 XA PREPARE X'78',X'',1
|
master-bin.000001 1221 Gtid 1 1264 GTID 0-1-5
|
master-bin.000001 1264 Query 1 1352 XA COMMIT X'78',X'',1
|
master-bin.000001 1352 Gtid 1 1394 GTID 0-1-6
|
master-bin.000001 1394 Query 1 1509 use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `tmp`
|
So, the first XA COMMIT is missing, and the replica fails with
2024-10-07 0:00:18 7 [ERROR] Slave SQL: XAER_DUPID: The XID already exists, Gtid 0-1-4, Internal MariaDB error code: 1440
|