Commit 384eb570 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-32144 Debug assertion failure w == MAYBE_NOP in mtr_t::memcpy()

trx_undo_write_trx_xid(): Silence the debug assertion by passing
a template parameter that causes us to not care that the contents of
the page did not actually change and no log record would be written.
This debug assertion could fail if XA PREPARE was executed multiple
times with the same XID.
parent f8f7d9de
...@@ -458,9 +458,9 @@ static uint16_t trx_undo_header_create(buf_block_t *undo_page, trx_id_t trx_id, ...@@ -458,9 +458,9 @@ static uint16_t trx_undo_header_create(buf_block_t *undo_page, trx_id_t trx_id,
mach_write_to_2(buf + 2, free); mach_write_to_2(buf + 2, free);
static_assert(TRX_UNDO_STATE + 2 == TRX_UNDO_LAST_LOG, "compatibility"); static_assert(TRX_UNDO_STATE + 2 == TRX_UNDO_LAST_LOG, "compatibility");
static_assert(!((TRX_UNDO_SEG_HDR + TRX_UNDO_STATE) % 4), "alignment"); static_assert(!((TRX_UNDO_SEG_HDR + TRX_UNDO_STATE) % 4), "alignment");
mtr->memcpy(*undo_page, my_assume_aligned<4> mtr->memcpy<mtr_t::MAYBE_NOP>
(TRX_UNDO_SEG_HDR + TRX_UNDO_STATE + undo_page->frame), (*undo_page, my_assume_aligned<4>
buf, 4); (TRX_UNDO_SEG_HDR + TRX_UNDO_STATE + undo_page->frame), buf, 4);
if (prev_log) if (prev_log)
mtr->write<2>(*undo_page, prev_log + TRX_UNDO_NEXT_LOG + undo_page->frame, mtr->write<2>(*undo_page, prev_log + TRX_UNDO_NEXT_LOG + undo_page->frame,
free); free);
......
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