summaryrefslogtreecommitdiffstats
path: root/storage/innobase/ibuf/ibuf0ibuf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/ibuf/ibuf0ibuf.cc')
-rw-r--r--storage/innobase/ibuf/ibuf0ibuf.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/storage/innobase/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc
index b9e94a67..4ec07b81 100644
--- a/storage/innobase/ibuf/ibuf0ibuf.cc
+++ b/storage/innobase/ibuf/ibuf0ibuf.cc
@@ -309,8 +309,13 @@ ibuf_header_page_get(
buf_block_t* block = buf_page_get(
page_id_t(IBUF_SPACE_ID, FSP_IBUF_HEADER_PAGE_NO),
0, RW_X_LATCH, mtr);
+ if (UNIV_UNLIKELY(!block)) {
+ return nullptr;
+ }
+
+ buf_page_make_young_if_needed(&block->page);
- return block ? block->page.frame : nullptr;
+ return block->page.frame;
}
/** Acquire the change buffer root page.
@@ -326,7 +331,12 @@ static buf_block_t *ibuf_tree_root_get(mtr_t *mtr, dberr_t *err= nullptr)
buf_block_t *block=
buf_page_get_gen(page_id_t{IBUF_SPACE_ID, FSP_IBUF_TREE_ROOT_PAGE_NO},
0, RW_SX_LATCH, nullptr, BUF_GET, mtr, err);
- ut_ad(!block || ibuf.empty == page_is_empty(block->page.frame));
+ if (block)
+ {
+ ut_ad(ibuf.empty == page_is_empty(block->page.frame));
+ buf_page_make_young_if_needed(&block->page);
+ }
+
return block;
}
@@ -408,7 +418,8 @@ err_exit:
+ header_page->page.frame, &ibuf.seg_size, &mtr);
do {
- DBUG_EXECUTE_IF("intermittent_read_failure", continue;);
+ IF_DBUG(if (_db_keyword_(nullptr, "intermittent_read_failure",
+ 1)) continue,);
ut_ad(ibuf.seg_size >= 2);
} while (0);