summaryrefslogtreecommitdiff
path: root/mysql-test/r/xa.result
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-03-10 15:04:32 +0400
committerSergey Vojtovich <svoj@sun.com>2010-03-10 15:04:32 +0400
commit8478e707d94bc9c8dd25024d6ca3ec4731fbbe66 (patch)
treef5d8084d539e0d15f67adc081d76d21e3effc94c /mysql-test/r/xa.result
parenta7f6326631a5187b4d5dce2b1e0d3cb6ea33ea20 (diff)
downloadmariadb-git-8478e707d94bc9c8dd25024d6ca3ec4731fbbe66.tar.gz
BUG#51342 - more xid crashing
SET autocommit=1 while XA transaction is active may cause various side effects, including memory corruption and server crash. The problem is that SET autocommit=1 and further queries attempt to commit local transaction, whereas XA transaction is still active. As local and XA transactions are mutually exclusive, this patch forbids enabling autocommit mode while XA transaction is active.
Diffstat (limited to 'mysql-test/r/xa.result')
-rw-r--r--mysql-test/r/xa.result17
1 files changed, 17 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