diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-02-06 14:50:50 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-06 14:50:50 +0100 |
commit | 4771ae4b22d2bdef0aafc563570c71d4636a2493 (patch) | |
tree | d115bd7c68b1e6feab68ff6fcd547e0c86c79296 /sql/transaction.cc | |
parent | 60f51af755ea9d07c20a596ba21de184816fa265 (diff) | |
parent | 0c25e58db6b045df92c209d396031cac5b528bbf (diff) | |
download | mariadb-git-4771ae4b22d2bdef0aafc563570c71d4636a2493.tar.gz |
Merge branch 'github/10.1' into 10.2
Diffstat (limited to 'sql/transaction.cc')
-rw-r--r-- | sql/transaction.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/transaction.cc b/sql/transaction.cc index d01519b8bd4..0f1cd377198 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -611,12 +611,8 @@ bool trans_savepoint(THD *thd, LEX_STRING name) !opt_using_transactions) DBUG_RETURN(FALSE); - enum xa_states xa_state= thd->transaction.xid_state.xa_state; - if (xa_state != XA_NOTR && xa_state != XA_ACTIVE) - { - my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]); + if (thd->transaction.xid_state.check_has_uncommitted_xa()) DBUG_RETURN(TRUE); - } sv= find_savepoint(thd, name); @@ -691,12 +687,8 @@ bool trans_rollback_to_savepoint(THD *thd, LEX_STRING name) DBUG_RETURN(TRUE); } - enum xa_states xa_state= thd->transaction.xid_state.xa_state; - if (xa_state != XA_NOTR) - { - my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]); + if (thd->transaction.xid_state.check_has_uncommitted_xa()) DBUG_RETURN(TRUE); - } /** Checking whether it is safe to release metadata locks acquired after |