diff --git a/storage/innobase/include/read0types.h b/storage/innobase/include/read0types.h index abf2bbc..eb13fe9 100644 --- a/storage/innobase/include/read0types.h +++ b/storage/innobase/include/read0types.h @@ -243,10 +243,6 @@ class ReadView { inline void prepare(trx_id_t id); /** - Complete the read view creation */ - inline void complete(); - - /** Copy state from another view. Must call copy_complete() to finish. @param other view to copy from */ inline void copy_prepare(const ReadView &other); diff --git a/storage/innobase/read/read0read.cc b/storage/innobase/read/read0read.cc index 68b2154..7133213 100644 --- a/storage/innobase/read/read0read.cc +++ b/storage/innobase/read/read0read.cc @@ -404,7 +404,7 @@ void ReadView::copy_trx_ids(const trx_ids_t &trx_ids) { ::memmove(p, &trx_ids[0], n); } - + m_up_limit_id = m_ids.front(); #ifdef UNIV_DEBUG /* Assert that all transaction ids in list are active. */ for (trx_ids_t::const_iterator it = trx_ids.begin(); it != trx_ids.end(); @@ -426,13 +426,15 @@ void ReadView::prepare(trx_id_t id) { m_creator_trx_id = id; - m_low_limit_no = m_low_limit_id = trx_sys->max_trx_id; + m_low_limit_no = m_low_limit_id = m_up_limit_id = trx_sys->max_trx_id; if (!trx_sys->rw_trx_ids.empty()) { copy_trx_ids(trx_sys->rw_trx_ids); } else { m_ids.clear(); } + + ut_ad(m_up_limit_id <= m_low_limit_id); if (UT_LIST_GET_LEN(trx_sys->serialisation_list) > 0) { const trx_t *trx; @@ -445,17 +447,6 @@ void ReadView::prepare(trx_id_t id) { } } -/** -Complete the read view creation */ - -void ReadView::complete() { - /* The first active transaction has the smallest id. */ - m_up_limit_id = !m_ids.empty() ? m_ids.front() : m_low_limit_id; - - ut_ad(m_up_limit_id <= m_low_limit_id); - - m_closed = false; -} /** Find a free view from the active list, if none found then allocate @@ -557,7 +548,6 @@ void MVCC::view_open(ReadView *&view, trx_t *trx) { if (view != NULL) { view->prepare(trx->id); - view->complete(); UT_LIST_ADD_FIRST(m_views, view); @@ -669,7 +659,6 @@ void MVCC::clone_oldest_view(ReadView *view) { trx_sys_mutex_exit(); - view->complete(); } else { view->copy_prepare(*oldest_view);