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

MDEV-21353 Assertion failures due to btr_pcur_restore_pos() misbehaving

In commit befde6e9
a bogus condition was added, aiming to avoid debug assertion failures
during ALTER TABLE...IMPORT TABLESPACE.

page_cur_delete_rec(): Remove the bogus condition, and replace the
use of buf_block_modify_clock_inc() with a lower-level operation
that skips the debug checks that would fail during IMPORT.
parent 305081a7
......@@ -2493,13 +2493,13 @@ page_cur_delete_rec(
page_header_set_ptr(block->frame, page_zip, PAGE_LAST_INSERT, NULL);
/* The page gets invalid for optimistic searches: increment
the frame modify clock. Avoid this during IMPORT; the block is
not actually in the buffer pool. */
if (mtr->get_log_mode() != MTR_LOG_NONE) {
buf_block_modify_clock_inc(block);
page_cur_delete_rec_write_log(current_rec, index, mtr);
}
/* The page gets invalid for btr_pcur_restore_pos().
We avoid invoking buf_block_modify_clock_inc(block) because its
consistency checks would fail for the dummy block that is being
used during IMPORT TABLESPACE. */
block->modify_clock++;
page_cur_delete_rec_write_log(current_rec, index, mtr);
/* 2. Find the next and the previous record. Note that the cursor is
left at the next record. */
......
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