153
# BUG#43171 - Assertion failed: thd->transaction.xid_state.xid.is_null()
155
CREATE TABLE t1(a INT, KEY(a)) ENGINE=InnoDB;
156
INSERT INTO t1 VALUES(1),(2);
157
connect(con1,localhost,root,,);
159
# Part 1: Prepare to test XA START after regular transaction deadlock
161
UPDATE t1 SET a=3 WHERE a=1;
165
UPDATE t1 SET a=4 WHERE a=2;
168
let $conn_id= `SELECT CONNECTION_ID()`;
169
SEND UPDATE t1 SET a=5 WHERE a=2;
172
let $wait_timeout= 2;
173
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
174
WHERE ID=$conn_id AND STATE='Searching rows for update';
175
--source include/wait_condition.inc
177
--error ER_LOCK_DEADLOCK
178
UPDATE t1 SET a=5 WHERE a=1;
181
# Part 2: Prepare to test XA START after XA transaction deadlock
186
UPDATE t1 SET a=3 WHERE a=1;
190
UPDATE t1 SET a=4 WHERE a=2;
193
SEND UPDATE t1 SET a=5 WHERE a=2;
196
let $wait_timeout= 2;
197
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
198
WHERE ID=$conn_id AND STATE='Searching rows for update';
199
--source include/wait_condition.inc
201
--error ER_LOCK_DEADLOCK
202
UPDATE t1 SET a=5 WHERE a=1;
203
--error ER_XA_RBDEADLOCK
152
214
# Wait till all disconnects are completed
153
215
--source include/wait_until_count_sessions.inc