summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0roll.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2018-03-30 00:33:58 +0400
committerSergey Vojtovich <svoj@mariadb.org>2018-04-04 14:09:37 +0400
commit0993d6b81b6cf7a5fc0710d99e962a8271018b9d (patch)
tree5367421cb176204685665ae19786f77556a42e6e /storage/innobase/trx/trx0roll.cc
parent061c767cce9eed62b08fbc09d66458bb6183eda7 (diff)
downloadmariadb-git-0993d6b81b6cf7a5fc0710d99e962a8271018b9d.tar.gz
MDEV-15773 - trx_sys.mysql_trx_list -> trx_sys.trx_list
Replaced "list of transactions created for MySQL" with "list of all transactions". This simplifies code and allows further removal of trx_sys.m_views.
Diffstat (limited to 'storage/innobase/trx/trx0roll.cc')
-rw-r--r--storage/innobase/trx/trx0roll.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc
index 5a30982a0df..b3d590482e0 100644
--- a/storage/innobase/trx/trx0roll.cc
+++ b/storage/innobase/trx/trx0roll.cc
@@ -759,14 +759,14 @@ trx_roll_must_shutdown()
static my_bool trx_rollback_recovered_callback(rw_trx_hash_element_t *element,
- trx_ut_list_t *trx_list)
+ std::vector<trx_t*> *trx_list)
{
mutex_enter(&element->mutex);
if (trx_t *trx= element->trx)
{
mutex_enter(&trx->mutex);
if (trx->is_recovered && trx_state_eq(trx, TRX_STATE_ACTIVE))
- UT_LIST_ADD_FIRST(*trx_list, trx);
+ trx_list->push_back(trx);
mutex_exit(&trx->mutex);
}
mutex_exit(&element->mutex);
@@ -791,10 +791,9 @@ static my_bool trx_rollback_recovered_callback(rw_trx_hash_element_t *element,
void trx_rollback_recovered(bool all)
{
- trx_ut_list_t trx_list;
+ std::vector<trx_t*> trx_list;
ut_a(srv_force_recovery < SRV_FORCE_NO_TRX_UNDO);
- UT_LIST_INIT(trx_list, &trx_t::mysql_trx_list);
/*
Collect list of recovered ACTIVE transaction ids first. Once collected, no
@@ -805,9 +804,10 @@ void trx_rollback_recovered(bool all)
(trx_rollback_recovered_callback),
&trx_list);
- while (trx_t *trx= UT_LIST_GET_FIRST(trx_list))
+ while (!trx_list.empty())
{
- UT_LIST_REMOVE(trx_list, trx);
+ trx_t *trx= trx_list.back();
+ trx_list.pop_back();
#ifdef UNIV_DEBUG
ut_ad(trx);