Commit 34c283ba authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-32132 DROP INDEX followed by CREATE INDEX may corrupt data

ibuf_set_bitmap_for_bulk_load(): Port a bug fix that was made as part of
commit 165564d3 (MDEV-30009)
in MariaDB Server 10.5.19.
parent 5544ea2e
......@@ -4944,7 +4944,13 @@ void ibuf_set_bitmap_for_bulk_load(buf_block_t *block, mtr_t *mtr, bool reset)
free_val = ibuf_index_page_calc_free(block);
bitmap_page = ibuf_bitmap_get_map_page(block->page.id,
block->zip_size(), mtr);
block->zip_size(), mtr);
if (ibuf_bitmap_page_get_bits(bitmap_page, block->page.id,
block->physical_size(),
IBUF_BITMAP_BUFFERED, mtr)) {
ibuf_delete_recs(block->page.id);
}
free_val = reset ? 0 : ibuf_index_page_calc_free(block);
ibuf_bitmap_page_set_bits(
......
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