Commit 3e9e377b authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-29590 Deadlock between ibuf_insert_to_index_page_low() and DDL

btr_page_reorganize_low(): Do not invoke lock_move_reorganize_page()
on a dummy index during change buffer merge. The ibuf.index page
latch that we are holding may block a DDL operation that is waiting
in ibuf_delete_for_discarded_space() while holding exclusive
lock_sys.latch. ibuf_insert_low() would refuse to buffer a change
if any locks exist for the index page.
parent 8872d2ee
......@@ -1410,7 +1410,10 @@ static dberr_t btr_page_reorganize_low(page_cur_t *cursor, dict_index_t *index,
block->page.frame + PAGE_MAX_TRX_ID + PAGE_HEADER,
PAGE_DATA - (PAGE_MAX_TRX_ID + PAGE_HEADER)));
if (index->has_locking())
if (!index->has_locking());
else if (index->page == FIL_NULL)
ut_ad(index->is_dummy);
else
lock_move_reorganize_page(block, old);
/* Write log for the changes, if needed. */
......
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