Skip to content

Commit 9dc50ea

Browse files
committed
MDEV-25979 Invalid page number written to DB_ROLL_PTR
trx_undo_report_row_operation(): Fix a race condition that was introduced in commit f74023b (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.
1 parent e46f76c commit 9dc50ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

storage/innobase/trx/trx0rec.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,12 +2054,11 @@ trx_undo_report_row_operation(
20542054
goto err_exit;
20552055
}
20562056

2057-
mtr_commit(&mtr);
2057+
mtr.commit();
20582058
} else {
20592059
/* Success */
2060-
mtr_commit(&mtr);
2061-
20622060
undo->top_page_no = undo_block->page.id.page_no();
2061+
mtr.commit();
20632062
undo->top_offset = offset;
20642063
undo->top_undo_no = trx->undo_no++;
20652064
undo->guess_block = undo_block;

0 commit comments

Comments
 (0)