Skip to content
Permalink
Browse files
MDEV-23973 Change buffer corruption when reallocating an recently fre…
…ed page

After commit abb678b
(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
  • Loading branch information
dr-m committed Oct 16, 2020
1 parent a011368 commit bdbec5a
Showing 1 changed file with 7 additions and 0 deletions.
@@ -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;
}

0 comments on commit bdbec5a

Please sign in to comment.