2020-03-31 15:10:54 +03:00
|
|
|
#
|
|
|
|
# Bug#20872655 XA ROLLBACK IS NOT CRASH-SAFE
|
|
|
|
#
|
|
|
|
CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE) ENGINE=INNODB;
|
|
|
|
INSERT INTO t SET a=0;
|
|
|
|
connect con1,localhost,root;
|
|
|
|
XA START 'zombie';
|
|
|
|
INSERT INTO t SET a=1;
|
|
|
|
UPDATE t SET b=1 WHERE a=1;
|
|
|
|
SELECT COUNT(*) FROM t;
|
|
|
|
COUNT(*)
|
|
|
|
2
|
|
|
|
XA END 'zombie';
|
|
|
|
XA PREPARE 'zombie';
|
2020-04-01 09:13:01 +03:00
|
|
|
SET DEBUG_SYNC='trx_after_rollback_row SIGNAL s1 WAIT_FOR s2';
|
2020-03-31 15:10:54 +03:00
|
|
|
XA ROLLBACK 'zombie';
|
|
|
|
connection default;
|
|
|
|
SET DEBUG_SYNC='now WAIT_FOR s1';
|
|
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
|
|
DELETE FROM t LIMIT 1;
|
|
|
|
disconnect con1;
|
|
|
|
XA COMMIT 'zombie';
|
|
|
|
ERROR XAE04: XAER_NOTA: Unknown XID
|
2020-04-01 09:13:01 +03:00
|
|
|
SELECT * FROM t;
|
|
|
|
a b
|
2020-03-31 15:10:54 +03:00
|
|
|
DROP TABLE t;
|