diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-02-01 21:55:30 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-02 10:09:44 +0100 |
commit | d4df7bc9b1fbdfb5c98134091a9ff998af60954f (patch) | |
tree | dfd2f5128ccf94b6e86d2475aee23acf53fa868c /sql/transaction.cc | |
parent | 80d3eee072025f34984e474ea160651eac9e11e5 (diff) | |
parent | 96cb428b350ba48ee17ad9968d08f5318e48258c (diff) | |
download | mariadb-git-d4df7bc9b1fbdfb5c98134091a9ff998af60954f.tar.gz |
Merge branch 'github/10.0' into 10.1
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 f03cced7bc8..1744feea151 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc @@ -536,12 +536,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); @@ -616,12 +612,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 |