Skip to content

Commit d8c0caa

Browse files
committed
MDEV-14756 - Remove trx_sys_t::rw_trx_list
Removed trx_sys_validate_trx_list(): with rw_trx_hash elements are not required to be ordered by transaction id. Transaction state is now guarded by asserts in rw_trx_hash_t.
1 parent 900b079 commit d8c0caa

File tree

3 files changed

+0
-57
lines changed

3 files changed

+0
-57
lines changed

storage/innobase/include/trx0sys.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,15 +242,6 @@ ulint
242242
trx_sys_any_active_transactions(void);
243243
/*=================================*/
244244

245-
#ifdef UNIV_DEBUG
246-
/*************************************************************//**
247-
Validate the trx_sys_t::rw_trx_list.
248-
@return true if the list is valid */
249-
bool
250-
trx_sys_validate_trx_list();
251-
/*========================*/
252-
#endif /* UNIV_DEBUG */
253-
254245
/** The automatically created system rollback segment has this id */
255246
#define TRX_SYS_SYSTEM_RSEG_ID0
256247

storage/innobase/trx/trx0sys.cc

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -664,46 +664,3 @@ trx_sys_any_active_transactions(void)
664664

665665
return(total_trx);
666666
}
667-
668-
#ifdef UNIV_DEBUG
669-
/*************************************************************//**
670-
Validate the trx_ut_list_t.
671-
@return true if valid. */
672-
static
673-
bool
674-
trx_sys_validate_trx_list_low(
675-
/*===========================*/
676-
trx_ut_list_t* trx_list)/*!< in: &trx_sys->rw_trx_list */
677-
{
678-
const trx_t* trx;
679-
const trx_t* prev_trx = NULL;
680-
681-
ut_ad(trx_sys_mutex_own());
682-
683-
ut_ad(trx_list == &trx_sys->rw_trx_list);
684-
685-
for (trx = UT_LIST_GET_FIRST(*trx_list);
686-
trx != NULL;
687-
prev_trx = trx, trx = UT_LIST_GET_NEXT(trx_list, prev_trx)) {
688-
689-
check_trx_state(trx);
690-
ut_a(prev_trx == NULL || prev_trx->id > trx->id);
691-
}
692-
693-
return(true);
694-
}
695-
696-
/*************************************************************//**
697-
Validate the trx_sys_t::rw_trx_list.
698-
@return true if the list is valid. */
699-
bool
700-
trx_sys_validate_trx_list()
701-
/*=======================*/
702-
{
703-
ut_ad(trx_sys_mutex_own());
704-
705-
ut_a(trx_sys_validate_trx_list_low(&trx_sys->rw_trx_list));
706-
707-
return(true);
708-
}
709-
#endif /* UNIV_DEBUG */

storage/innobase/trx/trx0trx.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,6 @@ trx_disconnect_from_mysql(
690690
trx_sys->mvcc->view_close(trx->read_view, true);
691691
}
692692

693-
ut_ad(trx_sys_validate_trx_list());
694-
695693
if (prepared) {
696694

697695
ut_ad(trx_state_eq(trx, TRX_STATE_PREPARED));
@@ -1249,8 +1247,6 @@ trx_start_low(
12491247
}
12501248
#endif /* UNIV_DEBUG */
12511249

1252-
ut_ad(trx_sys_validate_trx_list());
1253-
12541250
trx_sys_mutex_exit();
12551251
trx_sys->rw_trx_hash.insert(trx);
12561252

@@ -1617,7 +1613,6 @@ trx_erase_lists(
16171613
trx_sys_mutex_enter();
16181614
UT_LIST_REMOVE(trx_sys->rw_trx_list, trx);
16191615
ut_d(trx->in_rw_trx_list = false);
1620-
ut_ad(trx_sys_validate_trx_list());
16211616

16221617
if (trx->read_view != NULL) {
16231618
trx_sys->mvcc->view_close(trx->read_view, true);

0 commit comments

Comments
 (0)