From f168050e900c834f7ae1ac13d47983e79bf9a517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 12 Sep 2024 10:52:12 +0300 Subject: [PATCH] MDEV-34791 fixup: Avoid an infinite loop with ROW_FORMAT=COMPRESSED buf_pool_t::page_fix(): If a change buffer merge may be needed on a ROW_FORMAT=COMPRESSED page that exists in compressed-only format in the buffer pool, go ahead to decompress the block. This fixes an infinite loop. Reviewed by: Debarun Banerjee --- storage/innobase/buf/buf0buf.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 580e004ab3b..99143e810ed 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -2608,7 +2608,10 @@ buf_block_t *buf_pool_t::page_fix(const page_id_t id, return reinterpret_cast(-1); } - if (UNIV_UNLIKELY(!b->frame)) + if (UNIV_LIKELY(b->frame != nullptr)); + else if (state < buf_page_t::READ_FIX) + goto unzip; + else { wait_for_unzip: b->unfix(); @@ -2629,6 +2632,7 @@ buf_block_t *buf_pool_t::page_fix(const page_id_t id, if (UNIV_UNLIKELY(!b->frame)) { + unzip: if (b->lock.x_lock_try()); else if (c == FIX_NOWAIT) goto would_block;