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

After commit abb678b618
(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
This commit is contained in:
Marko Mäkelä 2020-10-16 17:28:23 +03:00
parent a0113683d7
commit bdbec5a2e9

View file

@ -3854,6 +3854,13 @@ loop:
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;
}