From 672cdcbb93a7355c715f3e232d4c5852209f30b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 26 Jan 2023 14:47:52 +0200 Subject: [PATCH] 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 56f6dab1d0e5a464ea49c1e5efb0032a0f5cea3e (MDEV-21174). --- storage/innobase/page/page0page.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index 1b8b3cb339f..f5f7d17f2d5 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -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) {