MDEV-25018 [FATAL] InnoDB: Unable to read page (of a dropped tablespace)
- This issue is caused by commit deadec4e689c9435e20ebb89fd8f84d3f0f90ff3 (MDEV-24569). InnoDB fails to read the change buffer bitmap page from dropped tablespace. In ibuf_bitmap_get_map_page_func(), InnoDB should fetch the page using BUF_GET_POSSIBLY_FREED mode. Callers of ibuf_bitmap_get_map_page() should be adjusted in that case.
This commit is contained in:
parent
4b166ca901
commit
aa4f76bed7
@ -688,19 +688,15 @@ ibuf_bitmap_get_map_page_func(
|
|||||||
unsigned line,
|
unsigned line,
|
||||||
mtr_t* mtr)
|
mtr_t* mtr)
|
||||||
{
|
{
|
||||||
buf_block_t* block = NULL;
|
buf_block_t* block = buf_page_get_gen(
|
||||||
dberr_t err = DB_SUCCESS;
|
|
||||||
|
|
||||||
block = buf_page_get_gen(
|
|
||||||
ibuf_bitmap_page_no_calc(page_id, zip_size),
|
ibuf_bitmap_page_no_calc(page_id, zip_size),
|
||||||
zip_size, RW_X_LATCH, NULL, BUF_GET, file, line, mtr, &err);
|
zip_size, RW_X_LATCH, NULL, BUF_GET_POSSIBLY_FREED,
|
||||||
|
file, line, mtr);
|
||||||
|
|
||||||
if (err != DB_SUCCESS) {
|
if (block) {
|
||||||
return NULL;
|
buf_block_dbg_add_level(block, SYNC_IBUF_BITMAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
buf_block_dbg_add_level(block, SYNC_IBUF_BITMAP);
|
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -741,9 +737,12 @@ ibuf_set_free_bits_low(
|
|||||||
#endif /* UNIV_IBUF_DEBUG */
|
#endif /* UNIV_IBUF_DEBUG */
|
||||||
const page_id_t id(block->page.id());
|
const page_id_t id(block->page.id());
|
||||||
|
|
||||||
|
if (buf_block_t* bitmap_page = ibuf_bitmap_get_map_page(
|
||||||
|
id, block->zip_size(), mtr)) {
|
||||||
ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
|
ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
|
||||||
ibuf_bitmap_get_map_page(id, block->zip_size(), mtr),
|
bitmap_page, id, block->physical_size(),
|
||||||
id, block->physical_size(), val, mtr);
|
val, mtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************//**
|
/************************************************************************//**
|
||||||
@ -887,10 +886,13 @@ ibuf_update_free_bits_zip(
|
|||||||
buf_page_make_young(&block->page);
|
buf_page_make_young(&block->page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (buf_block_t* bitmap_page = ibuf_bitmap_get_map_page(
|
||||||
|
block->page.id(), block->zip_size(), mtr)) {
|
||||||
|
|
||||||
ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
|
ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
|
||||||
ibuf_bitmap_get_map_page(block->page.id(), block->zip_size(),
|
bitmap_page, block->page.id(),
|
||||||
mtr),
|
block->physical_size(), after, mtr);
|
||||||
block->page.id(), block->physical_size(), after, mtr);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************//**
|
/**********************************************************************//**
|
||||||
@ -3669,14 +3671,15 @@ ibuf_insert_to_index_page_low(
|
|||||||
"InnoDB: is now probably corrupt. Please run CHECK TABLE on\n"
|
"InnoDB: is now probably corrupt. Please run CHECK TABLE on\n"
|
||||||
"InnoDB: that table.\n", stderr);
|
"InnoDB: that table.\n", stderr);
|
||||||
|
|
||||||
|
if (buf_block_t *bitmap_page = ibuf_bitmap_get_map_page(
|
||||||
|
block->page.id(), block->zip_size(), mtr)) {
|
||||||
|
|
||||||
ib::error() << "page " << block->page.id() << ", size "
|
ib::error() << "page " << block->page.id() << ", size "
|
||||||
<< block->physical_size() << ", bitmap bits "
|
<< block->physical_size() << ", bitmap bits "
|
||||||
<< ibuf_bitmap_page_get_bits(
|
<< ibuf_bitmap_page_get_bits(bitmap_page->frame,
|
||||||
ibuf_bitmap_get_map_page(block->page.id(),
|
|
||||||
block->zip_size(),
|
|
||||||
mtr)->frame,
|
|
||||||
block->page.id(), block->zip_size(),
|
block->page.id(), block->zip_size(),
|
||||||
IBUF_BITMAP_FREE, mtr);
|
IBUF_BITMAP_FREE, mtr);
|
||||||
|
}
|
||||||
|
|
||||||
ib::error() << BUG_REPORT_MSG;
|
ib::error() << BUG_REPORT_MSG;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user