Skip to content

Commit 27a2372

Browse files
committed
Bug#34964509 Assertion failure: btr0load.cc:912:blk == nullptr || blk->was_freed()
In the bulk load code, pages are allocated without knowledge of buffer pool. Once a page is allocated, there is a debug assert to ensure that the paticular page is not there in the buffer pool. This assert failed. If the buffer pool can contain unallocated page (perhaps with some old stale data), then this assert will not work. Hence we remove this assert. Instead, just ensure that this page is evicted from buffer pool. Change-Id: I30a2fbf1ba2a66074d10e7672a97fd6351ff7131
1 parent d261b0d commit 27a2372

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

storage/innobase/btr/btr0load.cc

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -899,19 +899,8 @@ dberr_t Level_ctx::init() {
899899
btr_page_set_next(new_page, page_zip, FIL_NULL, nullptr);
900900
btr_page_set_prev(new_page, page_zip, FIL_NULL, nullptr);
901901
btr_page_set_index_id(new_page, page_zip, m_index->id, nullptr);
902-
903-
#ifdef UNIV_DEBUG
904-
{
905-
/* Ensure that this page_id is not there in the buffer pool. */
906-
mtr_t local_mtr;
907-
local_mtr.start();
908-
buf_block_t *blk = buf_page_get_gen(page_id, page_size, RW_S_LATCH, nullptr,
909-
Page_fetch::IF_IN_POOL_POSSIBLY_FREED,
910-
UT_LOCATION_HERE, &local_mtr);
911-
ut_ad(blk == nullptr || blk->was_freed());
912-
local_mtr.commit();
913-
}
914-
#endif /* UNIV_DEBUG */
902+
/* Ensure that this page_id is not there in the buffer pool. */
903+
buf_page_force_evict(page_id, page_size);
915904
return block;
916905
}
917906

0 commit comments

Comments
 (0)