diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2019-04-21 13:27:27 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2019-04-25 15:06:40 +0400 |
commit | a168cfb39698d98a9906160a8f60b9522372c5e9 (patch) | |
tree | a678e25265decf1e55aa54ae7814acb93d9f2c7a /sql/session_tracker.cc | |
parent | f189f34ed4b8e00c7b88253b03ffc271452fe4d5 (diff) | |
download | mariadb-git-a168cfb39698d98a9906160a8f60b9522372c5e9.tar.gz |
Move XID_state::xa_state handing inside xa.cc
Let xid_cache_insert()/xid_cache_delete() handle xa_state.
Let session tracker use is_explicit_XA() rather than xa_state != XA_NOTR.
Fixed open_tables() to refuse data access in XA_ROLLBACK_ONLY state.
Removed dead code from THD::cleanup(). It was supposed to be a reminder,
but it got messed up over time.
spider_internal_start_trx() is called either with XA_NOTR or XA_ACTIVE,
which is guarded by server callers. Thus is_explicit_XA() is acceptable
replacement for XA_ACTIVE check (which was likely wrong anyway).
Setting xa_state to XA_PREPARED in spider_internal_xa_prepare() isn't
meaningful, as this value is never accessed later. It can't be accessed
by current thread and it can't be recovered either. It can only be
accessed by spider internally, which never happens.
Make spider_xa_lock()/spider_xa_unlock() static.
Part of MDEV-7974 - backport fix for mysql bug#12161 (XA and binlog)
Diffstat (limited to 'sql/session_tracker.cc')
-rw-r--r-- | sql/session_tracker.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc index b59475645fa..d6cc0552df6 100644 --- a/sql/session_tracker.cc +++ b/sql/session_tracker.cc @@ -1108,7 +1108,7 @@ bool Transaction_state_tracker::store(THD *thd, String *buf) if ((thd->variables.session_track_transaction_info == TX_TRACK_CHISTICS) && (tx_changed & TX_CHG_CHISTICS)) { - bool is_xa= (thd->transaction.xid_state.xa_state != XA_NOTR); + bool is_xa= thd->transaction.xid_state.is_explicit_XA(); size_t start; /* 2 length by 1 byte and code */ |