mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#12348348 - ASSERTION IN ROW0SEL.C LINE 3698:
TRX->CONC_STATE == 0 || TRX->CONC_STATE == 1 This bug was a different manifestation of Bug#11766752, which was previously only fixed on mysql-trunk. This patch backports the fix for Bug#11766752 to mysql-5.5, which fixes the problem. The patch also adds some extra test coverage.
This commit is contained in:
@@ -166,3 +166,37 @@ ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was det
|
||||
XA END 'b';
|
||||
XA ROLLBACK 'b';
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11766752 59936: multiple xa assertions - transactional
|
||||
# statement fuzzer
|
||||
#
|
||||
CREATE TABLE t1 (a INT) engine=InnoDB;
|
||||
XA START 'a';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
|
||||
XA END 'a';
|
||||
SELECT * FROM t1;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
SET @a=(SELECT * FROM t1);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the IDLE state
|
||||
XA PREPARE 'a';
|
||||
SELECT * FROM t1;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
INSERT INTO t1 VALUES (2);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
SAVEPOINT savep;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
SET @a=(SELECT * FROM t1);
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
UPDATE t1 SET a=1 WHERE a=2;
|
||||
ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the PREPARED state
|
||||
XA COMMIT 'a';
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
||||
@@ -287,6 +287,45 @@ DROP TABLE t1;
|
||||
disconnect con1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#11766752 59936: multiple xa assertions - transactional
|
||||
--echo # statement fuzzer
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT) engine=InnoDB;
|
||||
XA START 'a';
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--error ER_XAER_RMFAIL
|
||||
SAVEPOINT savep;
|
||||
|
||||
XA END 'a';
|
||||
--error ER_XAER_RMFAIL
|
||||
SELECT * FROM t1;
|
||||
--error ER_XAER_RMFAIL
|
||||
INSERT INTO t1 VALUES (2);
|
||||
--error ER_XAER_RMFAIL
|
||||
SAVEPOINT savep;
|
||||
--error ER_XAER_RMFAIL
|
||||
SET @a=(SELECT * FROM t1);
|
||||
|
||||
XA PREPARE 'a';
|
||||
--error ER_XAER_RMFAIL
|
||||
SELECT * FROM t1; # used to cause InnoDB assert
|
||||
--error ER_XAER_RMFAIL
|
||||
INSERT INTO t1 VALUES (2); # used to cause InnoDB assert
|
||||
--error ER_XAER_RMFAIL
|
||||
SAVEPOINT savep;
|
||||
--error ER_XAER_RMFAIL
|
||||
SET @a=(SELECT * FROM t1); # used to cause InnoDB assert
|
||||
--error ER_XAER_RMFAIL
|
||||
UPDATE t1 SET a=1 WHERE a=2;
|
||||
|
||||
XA COMMIT 'a';
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
# Wait till all disconnects are completed
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user