Commit 1b4c5b73 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-16868 Same query gives different results

An INSERT into a temporary table would fail to set the
index page as modified. If there were no other write operations
(such as UPDATE or DELETE) to the page, and the page was evicted,
we would read back the old contents of the page, causing
corruption or loss of data.

page_cur_insert_rec_write_log(): Call mtr_t::set_modified()
for temporary tables. Normally this is part of the mlog_open()
call, but the mlog_open() call was only present in debug builds.
This regression was caused by
commit 48192f96
which was preparation for MDEV-11369 and supposed to affect
debug builds only.

Thanks to Thirunarayanan Balathandayuthapani for debugging.
parent c164d0cc
......@@ -857,7 +857,8 @@ page_cur_insert_rec_write_log(
ulint i;
if (dict_table_is_temporary(index->table)) {
ut_ad(!mlog_open(mtr, 0));
mtr->set_modified();
ut_ad(mtr->get_log_mode() == MTR_LOG_NO_REDO);
return;
}
......
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