Skip to content

Commit

Permalink
MDEV-26782 fixup: Remove dead code
Browse files Browse the repository at this point in the history
trx_undo_reuse_cached(): Assert that this is being invoked on the
persistent rollback segment of the transaction, and remove dead code
that was handling cached temporary undo log. This was missed in
commit 51e62cb (MDEV-26782).
  • Loading branch information
dr-m committed Sep 12, 2023
1 parent a03b8cd commit 3c840ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions storage/innobase/trx/trx0undo.cc
Expand Up @@ -1258,6 +1258,8 @@ trx_undo_reuse_cached(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** pundo,
{
ut_ad(rseg->is_persistent());
ut_ad(rseg->is_referenced());
ut_ad(rseg == trx->rsegs.m_redo.rseg);

if (rseg->needs_purge <= trx->id) {
/* trx_purge_truncate_history() compares
rseg->needs_purge <= head.trx_no
Expand Down Expand Up @@ -1293,10 +1295,6 @@ trx_undo_reuse_cached(trx_t* trx, trx_rseg_t* rseg, trx_undo_t** pundo,

trx_undo_mem_init_for_reuse(undo, trx->id, &trx->xid, offset);

if (rseg != trx->rsegs.m_redo.rseg) {
return block;
}

if (trx->dict_operation) {
undo->dict_operation = TRUE;
mtr->write<1,mtr_t::MAYBE_NOP>(*block,
Expand Down

0 comments on commit 3c840ae

Please sign in to comment.