summaryrefslogtreecommitdiff
path: root/mysql-test/t/xa.test
diff options
context:
space:
mode:
authorJacob Mathew <jacob.mathew@mariadb.com>2018-03-13 16:15:37 -0700
committerJacob Mathew <jacob.mathew@mariadb.com>2018-03-13 16:15:37 -0700
commit1b82bec3c9ade9864dc9483e99d7b527ebff6bf1 (patch)
tree0f7cadc18142819248138802f73e4e0e638c8026 /mysql-test/t/xa.test
parent90247658e066c3ae5da1fefb988f5564e24abc90 (diff)
parent9d95b8665a3d87ab857e77e220effc64454eb881 (diff)
downloadmariadb-git-bb-10.2-MDEV-14019.tar.gz
Merge branch '10.2' into bb-10.2-MDEV-14019bb-10.2-MDEV-14019
Diffstat (limited to 'mysql-test/t/xa.test')
-rw-r--r--mysql-test/t/xa.test37
1 files changed, 36 insertions, 1 deletions
diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test
index 7303030921d..58ad1caaeef 100644
--- a/mysql-test/t/xa.test
+++ b/mysql-test/t/xa.test
@@ -394,6 +394,41 @@ DROP TABLE t1, t2;
disconnect con2;
-# Wait till all disconnects are completed
+#
+# MDEV 15217 Assertion `thd->transaction.xid_state.xid.is_null()' failed in trans_xa_start.
+#
+CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
+CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (1),(2);
+CREATE TABLE t3 (i INT) ENGINE=InnoDB;
+
+XA BEGIN 'xid1';
+REPLACE INTO t1 SELECT * FROM t2;
+
+--connect (con1,localhost,root,,test)
+XA BEGIN 'xid2';
+--send
+INSERT INTO t1 SELECT * FROM t2;
+
+--connection default
+REPLACE INTO t2 SELECT * FROM t2;
+
+--connection con1
+--error 0, ER_LOCK_DEADLOCK, ER_LOCK_WAIT_TIMEOUT
+--reap
+--disconnect con1
+
+--connect (con2,localhost,root,,test)
+INSERT INTO t3 VALUES (1);
+XA BEGIN 'xid3';
+
+
+#Cleanup
+--disconnect con2
+--connection default
+XA END 'xid1';
+XA ROLLBACK 'xid1';
+DROP TABLE t1, t2, t3;
+
--source include/wait_until_count_sessions.inc