summaryrefslogtreecommitdiff
path: root/sql/transaction.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2018-02-08 19:06:25 +0400
committerAlexander Barkov <bar@mariadb.org>2018-02-08 19:06:25 +0400
commit3cad31f2a758f797ef0acac5625d0e007ecbce93 (patch)
tree73c054636c4858b2a51eddf7eaa653746d67524e /sql/transaction.cc
parent560b9895d413bdfedda0a0ca871a635858990c05 (diff)
parent5c057b3fef3aa92cfadbd63043799b430132a494 (diff)
downloadmariadb-git-3cad31f2a758f797ef0acac5625d0e007ecbce93.tar.gz
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'sql/transaction.cc')
-rw-r--r--sql/transaction.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/sql/transaction.cc b/sql/transaction.cc
index 78cd3047f82..a6db204c45b 100644
--- a/sql/transaction.cc
+++ b/sql/transaction.cc
@@ -611,12 +611,8 @@ bool trans_savepoint(THD *thd, LEX_CSTRING 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_CSTRING 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