Commit 6ca06546 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-19514 fixup: Optimize ibuf_merge_or_delete_for_page() calls

parent 601eb411
......@@ -3812,7 +3812,8 @@ buf_page_create(fil_space_t *space, uint32_t offset,
/* Delete possible entries for the page from the insert buffer:
such can exist if the page belonged to an index which was dropped */
if (!recv_recovery_is_on())
if (page_id < page_id_t{SRV_SPACE_ID_UPPER_BOUND, 0} &&
!recv_recovery_is_on())
ibuf_merge_or_delete_for_page(nullptr, page_id, zip_size);
static_assert(FIL_PAGE_PREV + 4 == FIL_PAGE_NEXT, "adjacent");
......
......@@ -4203,6 +4203,10 @@ subsequently was dropped.
void ibuf_merge_or_delete_for_page(buf_block_t *block, const page_id_t page_id,
ulint zip_size)
{
if (trx_sys_hdr_page(page_id)) {
return;
}
btr_pcur_t pcur;
#ifdef UNIV_IBUF_DEBUG
ulint volume = 0;
......@@ -4217,11 +4221,8 @@ void ibuf_merge_or_delete_for_page(buf_block_t *block, const page_id_t page_id,
ut_ad(!block || page_id == block->page.id());
ut_ad(!block || block->page.state() == BUF_BLOCK_FILE_PAGE);
ut_ad(!block || block->page.status == buf_page_t::NORMAL);
if (trx_sys_hdr_page(page_id)
|| fsp_is_system_temporary(page_id.space())) {
return;
}
ut_ad(!trx_sys_hdr_page(page_id));
ut_ad(page_id < page_id_t(SRV_SPACE_ID_UPPER_BOUND, 0));
const ulint physical_size = zip_size ? zip_size : srv_page_size;
......
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