From 01f84b070b855f0fa6a72b3287968415de0644f0 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Fri, 19 Apr 2024 20:24:00 +0500 Subject: [PATCH] Fix build if UNIV_ZIP_DEBUG is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the UNIV_ZIP_DEBUG is enabled during build, the build process may fail with the error: In function ‘bool buf_LRU_block_remove_hashed(buf_page_t*, bool, bool)’: error: ‘struct buf_block_t’ has no member named ‘index’ ((buf_block_t *)bpage)->index)); ^~~~~ Because the 'index' field was moved from the buf_block_t structure to the buf_block_t.ahi_t in the d7114b14050 commit. The second error appears in the page_delete_rec(). Since the 'page_zip' parameter was removed from the function, the assert checks that are enabled in a case of UNIV_ZIP_DEBUG are failed. As there is no such parameter in the page_delete_rec() function anymore the both assertions are removed. The commit fixes the both compilation errors. Signed-off-by: Alexander Kuleshov --- storage/innobase/buf/buf0lru.cc | 2 +- storage/innobase/page/page0page.cc | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/storage/innobase/buf/buf0lru.cc b/storage/innobase/buf/buf0lru.cc index 8986ac3e6aed..b7df13fa5287 100644 --- a/storage/innobase/buf/buf0lru.cc +++ b/storage/innobase/buf/buf0lru.cc @@ -2135,7 +2135,7 @@ static bool buf_LRU_block_remove_hashed(buf_page_t *bpage, bool zip, case FIL_PAGE_RTREE: #ifdef UNIV_ZIP_DEBUG ut_a(page_zip_validate(&bpage->zip, page, - ((buf_block_t *)bpage)->index)); + ((buf_block_t *)bpage)->ahi.index)); #endif /* UNIV_ZIP_DEBUG */ break; default: diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index 33a78bd198f1..eead63fb102c 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -2580,15 +2580,7 @@ bool page_delete_rec(const dict_index_t *index, page_cur_t *pcur, } if (no_compress_needed) { -#ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page, index)); -#endif /* UNIV_ZIP_DEBUG */ - page_cur_delete_rec(pcur, index, offsets, nullptr); - -#ifdef UNIV_ZIP_DEBUG - ut_a(!page_zip || page_zip_validate(page_zip, page, index)); -#endif /* UNIV_ZIP_DEBUG */ } return (no_compress_needed);