diff options
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 4db7f58b513..3ab1e9c7cc2 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2801,18 +2801,6 @@ trx_is_registered_for_2pc( } /*********************************************************************//** -Note that innobase_commit_ordered() was run. */ -static inline -void -trx_set_active_commit_ordered( -/*==========================*/ - trx_t* trx) /* in: transaction */ -{ - ut_a(trx_is_registered_for_2pc(trx)); - trx->active_commit_ordered = 1; -} - -/*********************************************************************//** Note that a transaction has been registered with MySQL 2PC coordinator. */ static inline void @@ -2821,7 +2809,7 @@ trx_register_for_2pc( trx_t* trx) /* in: transaction */ { trx->is_registered = 1; - ut_ad(trx->active_commit_ordered == 0); + ut_ad(!trx->active_commit_ordered); } /*********************************************************************//** @@ -2832,19 +2820,8 @@ trx_deregister_from_2pc( /*====================*/ trx_t* trx) /* in: transaction */ { - trx->is_registered = 0; - trx->active_commit_ordered = 0; -} - -/*********************************************************************//** -Check whether a transaction has active_commit_ordered set */ -static inline -bool -trx_is_active_commit_ordered( -/*=========================*/ - const trx_t* trx) /* in: transaction */ -{ - return(trx->active_commit_ordered == 1); + trx->is_registered= false; + trx->active_commit_ordered= false; } /*********************************************************************//** @@ -4617,8 +4594,7 @@ innobase_commit_ordered( (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))); innobase_commit_ordered_2(trx, thd); - - trx_set_active_commit_ordered(trx); + trx->active_commit_ordered = true; DBUG_VOID_RETURN; } @@ -4671,7 +4647,7 @@ innobase_commit( DBUG_SUICIDE();); /* Run the fast part of commit if we did not already. */ - if (!trx_is_active_commit_ordered(trx)) { + if (!trx->active_commit_ordered) { innobase_commit_ordered_2(trx, thd); } @@ -5185,12 +5161,12 @@ static void innobase_kill_query(handlerton*, THD* thd, enum thd_kill_levels) trx_mutex_enter(trx); /* It is possible that innobase_close_connection() is concurrently being executed on our victim. In that case, trx->mysql_thd would - be reset before invoking trx_free(). Even if the trx object is later + be reset before invoking trx_t::free(). Even if the trx object is later reused for another client connection or a background transaction, its trx->mysql_thd will differ from our thd. If trx never performed any changes, nothing is really protecting - the trx_free() call or the changes of trx_t::state when the + the trx_t::free() call or the changes of trx_t::state when the transaction is being rolled back and trx_commit_low() is being executed. |