Commit 672cdcbb authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-30404: Inconsistent updates of PAGE_MAX_TRX_ID on ROW_FORMAT=COMPRESSED pages

page_copy_rec_list_start(): Do not update the PAGE_MAX_TRX_ID
on the compressed copy of the page. The modification is supposed
to be logged as part of page_zip_compress() or page_zip_reorganize().
If the page cannot be compressed (due to running out of space),
then page_zip_decompress() must be able to roll back the changes.

This fixes a regression that was introduced in
commit 56f6dab1 (MDEV-21174).
parent e02ed04d
......@@ -765,12 +765,9 @@ page_copy_rec_list_start(
same temp-table in parallel.
max_trx_id is ignored for temp tables because it not required
for MVCC. */
if (n_core && dict_index_is_sec_or_ibuf(index)
&& !index->table->is_temporary()) {
page_update_max_trx_id(new_block,
new_page_zip,
page_get_max_trx_id(block->frame),
mtr);
if (n_core && !index->is_primary() && !index->table->is_temporary()) {
page_update_max_trx_id(new_block, nullptr,
page_get_max_trx_id(block->frame), mtr);
}
if (new_page_zip) {
......
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