diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-04-19 15:52:11 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-04-19 15:52:11 +0300 |
commit | 78368e5866383333407a4e2752c8b62df8fb8c29 (patch) | |
tree | 3857c060954a84c08defb50d354c69c84305d63b /storage/innobase | |
parent | 1892f5d8fcb73350973f93b1a89cdc1482a5c116 (diff) | |
download | mariadb-git-78368e5866383333407a4e2752c8b62df8fb8c29.tar.gz |
MDEV-30863 fixup: Assertion failure when using innodb_undo_tablespaces=0
trx_assign_rseg_low(): Let us restore the debug variable look_for_rollover
to avoid assertion failures when a server that was created with
multiple undo tablespaces is being started with innodb_undo_tablespaces=0.
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index a84ae220839..88e42b2ebad 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -812,6 +812,7 @@ static void trx_assign_rseg_low(trx_t *trx) unsigned slot = rseg_slot++ % TRX_SYS_N_RSEGS; ut_d(if (trx_rseg_n_slots_debug) slot = 0); ut_d(const auto start_scan_slot = slot); + ut_d(bool look_for_rollover = false); trx_rseg_t* rseg; bool allocated; @@ -819,12 +820,10 @@ static void trx_assign_rseg_low(trx_t *trx) do { for (;;) { rseg = &trx_sys.rseg_array[slot]; - - do { - ut_d(if (trx_rseg_n_slots_debug) continue); - slot = (slot + 1) % TRX_SYS_N_RSEGS; - ut_ad(start_scan_slot != slot); - } while (0); + ut_ad(!look_for_rollover || start_scan_slot != slot); + ut_d(look_for_rollover = true); + ut_d(if (!trx_rseg_n_slots_debug)) + slot = (slot + 1) % TRX_SYS_N_RSEGS; if (!rseg->space) { continue; |