Skip to content

Commit

Permalink
MDEV-29593 fixup: Avoid a leak if rseg.undo_cached is corrupted
Browse files Browse the repository at this point in the history
trx_purge_truncate_rseg_history(): Avoid a leak similar to the one
that was fixed in MDEV-31324, in case a supposedly cached undo log
page is not found in the rseg.undo_cached list.
  • Loading branch information
dr-m authored and vuvova committed Jun 3, 2023
1 parent e89bd39 commit 459eb9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions storage/innobase/trx/trx0purge.cc
Expand Up @@ -510,9 +510,9 @@ trx_purge_truncate_rseg_history(trx_rseg_t& rseg,
if (undo->hdr_page_no == hdr_addr.page)
goto found_cached;
ut_ad("inconsistent undo logs" == 0);
break;
found_cached:
UT_LIST_REMOVE(rseg.undo_cached, undo);
if (false)
found_cached:
UT_LIST_REMOVE(rseg.undo_cached, undo);
static_assert(FIL_NULL == 0xffffffff, "");
if (UNIV_UNLIKELY(mach_read_from_4(TRX_RSEG + TRX_RSEG_FORMAT +
rseg_hdr->page.frame)))
Expand Down

0 comments on commit 459eb9a

Please sign in to comment.