summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-03-10 15:07:35 +0400
committerSergey Vojtovich <svoj@sun.com>2010-03-10 15:07:35 +0400
commit992f6754ac9a4af9b2ceb1f3fe81df44283e369b (patch)
tree7aa89cd0ec2c40cb4c06428d49ab54d710c285c2 /mysql-test
parent91056475e1f9d64d57d9d2f602575aaad57dcff3 (diff)
parent405fd822075488597484ef5ce82a8d3296262130 (diff)
downloadmariadb-git-992f6754ac9a4af9b2ceb1f3fe81df44283e369b.tar.gz
Merge fix for BUG51342 to 5.0-bugteam.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/xa.result17
-rw-r--r--mysql-test/t/xa.test16
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/r/xa.result b/mysql-test/r/xa.result
index 592cf07522b..acf219688e1 100644
--- a/mysql-test/r/xa.result
+++ b/mysql-test/r/xa.result
@@ -74,4 +74,21 @@ ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was det
xa rollback 'a','c';
xa start 'a','c';
drop table t1;
+#
+# BUG#51342 - more xid crashing
+#
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+XA START 'x';
+SET SESSION autocommit=0;
+INSERT INTO t1 VALUES(1);
+SET SESSION autocommit=1;
+ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state
+SELECT @@autocommit;
+@@autocommit
+0
+INSERT INTO t1 VALUES(1);
+XA END 'x';
+XA COMMIT 'x' ONE PHASE;
+DROP TABLE t1;
+SET SESSION autocommit=DEFAULT;
End of 5.0 tests
diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test
index 04ecf518577..d5def009172 100644
--- a/mysql-test/t/xa.test
+++ b/mysql-test/t/xa.test
@@ -122,6 +122,22 @@ xa start 'a','c';
--connection default
drop table t1;
+--echo #
+--echo # BUG#51342 - more xid crashing
+--echo #
+CREATE TABLE t1(a INT) ENGINE=InnoDB;
+XA START 'x';
+SET SESSION autocommit=0;
+INSERT INTO t1 VALUES(1);
+--error ER_XAER_RMFAIL
+SET SESSION autocommit=1;
+SELECT @@autocommit;
+INSERT INTO t1 VALUES(1);
+XA END 'x';
+XA COMMIT 'x' ONE PHASE;
+DROP TABLE t1;
+SET SESSION autocommit=DEFAULT;
+
--echo End of 5.0 tests
# Wait till all disconnects are completed