Commit de208723 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22988 Corrupted table after DROP INDEX

This form of corruption was only reproduced on MariaDB 10.5.4
after the MDEV-22867 fix was applied in
commit 43120009.

While we do not know how to reproduce this corruption in
MariaDB 10.4, we are applying the code fix without a test case.

btr_cur_pessimistic_update(): Invoke btr_set_instant() if needed.
parent 5d471453
......@@ -5091,6 +5091,11 @@ btr_cur_pessimistic_update(
btr_page_reorganize(page_cursor, index, mtr);
rec = page_cursor->rec;
rec_offs_make_valid(rec, index, true, *offsets);
if (page_cursor->block->page.id.page_no()
== index->page) {
btr_set_instant(page_cursor->block, *index,
mtr);
}
} else if (!dict_table_is_locking_disabled(index->table)) {
lock_rec_restore_from_page_infimum(
btr_cur_get_block(cursor), rec, block);
......
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