Commit 9dc50ea2 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-25979 Invalid page number written to DB_ROLL_PTR

trx_undo_report_row_operation(): Fix a race condition that was introduced
in commit f74023b9 (MDEV-15090).
We must not access undo_block after the page latch has been released
in mtr_t::commit(), because the block could be evicted or replaced.
parent e46f76c9
......@@ -2054,12 +2054,11 @@ trx_undo_report_row_operation(
goto err_exit;
}
mtr_commit(&mtr);
mtr.commit();
} else {
/* Success */
mtr_commit(&mtr);
undo->top_page_no = undo_block->page.id.page_no();
mtr.commit();
undo->top_offset = offset;
undo->top_undo_no = trx->undo_no++;
undo->guess_block = undo_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