diff options
Diffstat (limited to 'storage/innobase/trx/trx0trx.cc')
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index c75d766a48b..de5af9764fa 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -776,11 +776,13 @@ evenly distributed between 0 and innodb_undo_logs-1 @retval NULL if innodb_read_only */ static trx_rseg_t* trx_assign_rseg_low() { - if (srv_read_only_mode) { - ut_ad(srv_undo_logs == ULONG_UNDEFINED); + if (high_level_read_only) { + ut_ad(!srv_available_undo_logs); return(NULL); } + ut_ad(srv_available_undo_logs == TRX_SYS_N_RSEGS); + /* The first slot is always assigned to the system tablespace. */ ut_ad(trx_sys.rseg_array[0]->space == fil_system.sys_space); @@ -793,7 +795,8 @@ static trx_rseg_t* trx_assign_rseg_low() that start modifications concurrently will write their undo log to the same rollback segment. */ static ulong rseg_slot; - ulint slot = rseg_slot++ % srv_undo_logs; + ulint slot = rseg_slot++ % TRX_SYS_N_RSEGS; + ut_d(if (trx_rseg_n_slots_debug) slot = 0); trx_rseg_t* rseg; #ifdef UNIV_DEBUG @@ -816,7 +819,8 @@ static trx_rseg_t* trx_assign_rseg_low() look_for_rollover = true; #endif /* UNIV_DEBUG */ - slot = (slot + 1) % srv_undo_logs; + ut_d(if (!trx_rseg_n_slots_debug)) + slot = (slot + 1) % TRX_SYS_N_RSEGS; if (rseg == NULL) { continue; |