From 055ce75d8be485de3acf101c042b21ab0fc5a823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 17 Feb 2020 14:52:20 +0200 Subject: [PATCH] MDEV-21174: Correct a debug assertion failure trx_purge_free_segment(): In some cases (observed when running the test innodb_zip.wl5522_debug_zip), there is no change to the TRX_UNDO_NEEDS_PURGE field. Add mtr_t::OPT to disable a debug check. The bogus debug check was introduced in commit 56f6dab1d0e5a464ea49c1e5efb0032a0f5cea3e. --- storage/innobase/trx/trx0purge.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index bda0b13845a..fa3a3fcc951 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -361,8 +361,8 @@ trx_purge_free_segment(trx_rseg_t* rseg, fil_addr_t hdr_addr) again. The list of pages in the undo log tail gets inconsistent during the freeing of the segment, and therefore purge should not try to access them again. */ - mtr.write<2>(*block, block->frame + hdr_addr.boffset - + TRX_UNDO_NEEDS_PURGE, 0U); + mtr.write<2,mtr_t::OPT>(*block, block->frame + hdr_addr.boffset + + TRX_UNDO_NEEDS_PURGE, 0U); while (!fseg_free_step_not_header( TRX_UNDO_SEG_HDR + TRX_UNDO_FSEG_HEADER