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

MDEV-23304 Insert into TEMPORARY TABLE fails to invoke mtr_t::set_modified()

In MDEV-21724 or possibly already in MDEV-12353 a bug was introduced to
the handling of temporary tables.

Whether or not redo log will be written, mtr_t::set_modified()
must be invoked to register any changes to a page.

page_cur_insert_rec_low(): Invoke mtr_t::set_modified() also
when skipping the redo log write.
parent 2c5831b2
......@@ -1493,7 +1493,10 @@ page_cur_insert_rec_low(
rec_set_bit_field_1(next_rec, n_owned + 1, REC_NEW_N_OWNED,
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT);
if (mtr->get_log_mode() != MTR_LOG_ALL)
{
mtr->set_modified(*block);
goto copied;
}
const byte * const c_start= cur->rec - extra_size;
if (extra_size > REC_N_NEW_EXTRA_BYTES &&
......@@ -1532,7 +1535,10 @@ page_cur_insert_rec_low(
rec_set_bit_field_1(next_rec, n_owned + 1, REC_OLD_N_OWNED,
REC_N_OWNED_MASK, REC_N_OWNED_SHIFT);
if (mtr->get_log_mode() != MTR_LOG_ALL)
{
mtr->set_modified(*block);
goto copied;
}
ut_ad(extra_size > REC_N_OLD_EXTRA_BYTES);
const byte * const c_start= cur->rec - extra_size;
......
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