Commit 6429bcd5 authored by marko's avatar marko

ibuf_merge_or_delete_for_page(): Fix inappropriate latching of pages

when merging a purge (IBUF_OP_DELETE).
This bug was introduced in r6772.
parent b1143bcd
...@@ -4392,11 +4392,26 @@ loop: ...@@ -4392,11 +4392,26 @@ loop:
btr_pcur_store_position(&pcur, &mtr); btr_pcur_store_position(&pcur, &mtr);
btr_pcur_commit_specify_mtr(&pcur, &mtr); btr_pcur_commit_specify_mtr(&pcur, &mtr);
mtr_start(&mtr);
if (block) {
ibool success;
success = buf_page_get_known_nowait(
RW_X_LATCH, block,
BUF_KEEP_OLD,
__FILE__, __LINE__, &mtr);
ut_a(success);
buf_block_dbg_add_level(
block, SYNC_TREE_NODE);
}
if (!ibuf_restore_pos(space, page_no, if (!ibuf_restore_pos(space, page_no,
search_tuple, search_tuple,
BTR_MODIFY_LEAF, BTR_MODIFY_LEAF,
&pcur, &mtr)) { &pcur, &mtr)) {
mtr_commit(&mtr);
mops[op]++; mops[op]++;
ibuf_dummy_index_free(dummy_index); ibuf_dummy_index_free(dummy_index);
goto loop; goto loop;
......
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