Commit 459eb9a6 authored by Marko Mäkelä's avatar Marko Mäkelä Committed by Sergei Golubchik

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.
parent e89bd39c
......@@ -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)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment