Browse Source

MDEV-25979 Invalid page number written to DB_ROLL_PTR

trx_undo_report_row_operation(): Fix a race condition that was introduced
in commit f74023b955 (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.
bb-10.3-nikita-mdev-24511
Marko Mäkelä 4 years ago
parent
commit
9dc50ea229
  1. 5
      storage/innobase/trx/trx0rec.cc

5
storage/innobase/trx/trx0rec.cc

@ -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;

Loading…
Cancel
Save