Commit bdbec5a2 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-23973 Change buffer corruption when reallocating an recently freed page

After commit abb678b6
(a follow-up fix to MDEV-19514 to prevent potential hangs)
and MDEV-23399, the probability for hitting a dormant bug
that is related to MDEV-19514 was increased.

buf_page_create(): Call ibuf_merge_or_delete_for_page() also
when reusing a previously freed page.

Reviewed by: Thirunarayanan Balathandayuthapani
parent a0113683
......@@ -3854,6 +3854,13 @@ buf_page_create(fil_space_t *space, uint32_t offset,
mtr_memo_push(mtr, block, MTR_MEMO_PAGE_X_FIX);
if (block->page.ibuf_exist)
{
if (!recv_recovery_is_on())
ibuf_merge_or_delete_for_page(nullptr, page_id, zip_size, true);
block->page.ibuf_exist= false;
}
return block;
}
......
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