From: Dmitry Shulga Date: March 15 2012 9:13am Subject: bzr push into mysql-5.5 branch (Dmitry.Shulga:3753 to 3754) Bug#13737343 List-Archive: http://lists.mysql.com/commits/143205 X-Bug: 13737343 Message-Id: <201203150813.q2F8DCRv005459@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3754 Dmitry Shulga 2012-03-15 This patch fixes the bug#13737343 (formerly known as 64374): XA TRANSACTIONS AND SAVEPOINT. The bug was introduced by the patch for bug#11766752. This patch sets too strong condition on XA state for SAVEPOINT statement that disallows its execution during XA transaction. But since the statement SAVEPOINT doesn't imply implicit commit we can allow its handling during XA transaction. The patch explicitly check for transaction state against states XA_NOTR and XA_ACTIVE for which the handling of statement SAVEPOINT for XA transaction is allowed. @ mysql-test/t/xa.test Testcase was adjusted for bug#13737343. Now SAVEPOINT is allowed for XA transactions in ACTIVE state. modified: mysql-test/r/xa.result mysql-test/t/xa.test sql/transaction.cc 3753 sayantan.dutta@stripped 2012-03-15 BUG #13619394 - 62572: "MAKE TEST" FAILS ON "MY_VSNPRINTF"Reverting Back sighting Bar's mail. modified: unittest/mysys/my_vsnprintf-t.c === modified file 'mysql-test/r/xa.result' --- a/mysql-test/r/xa.result 2012-01-20 10:03:39 +0000 +++ b/mysql-test/r/xa.result 2012-03-15 09:10:57 +0000 @@ -174,7 +174,6 @@ 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 === modified file 'mysql-test/t/xa.test' --- a/mysql-test/t/xa.test 2012-01-20 10:03:39 +0000 +++ b/mysql-test/t/xa.test 2012-03-15 09:10:57 +0000 @@ -298,7 +298,6 @@ CREATE TABLE t1 (a INT) engine=InnoDB; XA START 'a'; INSERT INTO t1 VALUES (1); ---error ER_XAER_RMFAIL SAVEPOINT savep; XA END 'a'; === modified file 'sql/transaction.cc' --- a/sql/transaction.cc 2011-04-14 08:13:28 +0000 +++ b/sql/transaction.cc 2012-03-15 09:10:57 +0000 @@ -390,7 +390,7 @@ bool trans_savepoint(THD *thd, LEX_STRIN DBUG_RETURN(FALSE); enum xa_states xa_state= thd->transaction.xid_state.xa_state; - if (xa_state != XA_NOTR) + if (xa_state != XA_NOTR && xa_state != XA_ACTIVE) { my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]); DBUG_RETURN(TRUE); No bundle (reason: useless for push emails).