Skip to content

Commit 459eb9a

Browse files
dr-mvuvova
authored andcommitted
MDEV-29593 fixup: Avoid a leak if rseg.undo_cached is corrupted
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.
1 parent e89bd39 commit 459eb9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/innobase/trx/trx0purge.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,9 @@ trx_purge_truncate_rseg_history(trx_rseg_t& rseg,
510510
if (undo->hdr_page_no == hdr_addr.page)
511511
goto found_cached;
512512
ut_ad("inconsistent undo logs" == 0);
513-
break;
514-
found_cached:
515-
UT_LIST_REMOVE(rseg.undo_cached, undo);
513+
if (false)
514+
found_cached:
515+
UT_LIST_REMOVE(rseg.undo_cached, undo);
516516
static_assert(FIL_NULL == 0xffffffff, "");
517517
if (UNIV_UNLIKELY(mach_read_from_4(TRX_RSEG + TRX_RSEG_FORMAT +
518518
rseg_hdr->page.frame)))

0 commit comments

Comments
 (0)