diff --git a/buf/buf0flu.c b/buf/buf0flu.c index 304472bb319..f866fd105e2 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -480,8 +480,8 @@ buf_flush_init_for_writing( buf_calc_page_old_checksum(page) : BUF_NO_CHECKSUM_MAGIC); #if 1 /* testing */ if (space /* skip the system tablespace */ - && (page_no & (UNIV_PAGE_SIZE - 1)) /* skip extent descriptors */ - && page_is_comp(page) /* skip row_format=redundant pages */) { + && page_no != FSP_FIRST_INODE_PAGE_NO + && page_no % XDES_DESCRIBED_PER_PAGE > FSP_IBUF_BITMAP_OFFSET) { if (memcmp(page + PAGE_NEW_INFIMUM, "infimum", 8)) { fprintf(stderr, "page %lu:%lu: cannot compress\n", (ulong) space, (ulong) page_no); @@ -495,8 +495,11 @@ buf_flush_init_for_writing( ut_a(page_zip_compress(page_zip, page)); - fprintf(stderr, "page %lu:%lu: zip size==%lu+%lu\n", + fprintf(stderr, + "page %lu:%lu (%lu): zip size==%lu+%lu\n", (ulong) space, (ulong) page_no, + (ulong) mach_read_from_2(page + + (PAGE_HEADER + PAGE_LEVEL)), (ulong) page_zip->m_start, (ulong) 2 * page_dir_get_n_heap(page_zip->data)); diff --git a/include/page0zip.h b/include/page0zip.h index 534ecec44a4..1088421186d 100644 --- a/include/page0zip.h +++ b/include/page0zip.h @@ -62,7 +62,9 @@ page_zip_simple_validate( /* out: TRUE if ok */ const page_zip_des_t* page_zip); /* in: compressed page descriptor */ +#endif /* UNIV_DEBUG */ +#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG /************************************************************************** Check that the compressed and decompressed pages match. */ @@ -71,7 +73,7 @@ page_zip_validate( /*==============*/ const page_zip_des_t* page_zip,/* in: compressed page */ const page_t* page); /* in: uncompressed page */ -#endif /* UNIV_DEBUG */ +#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */ /***************************************************************** Gets the size of the compressed page trailer (the dense page directory). */ diff --git a/include/univ.i b/include/univ.i index 15650f22ed8..087c1cfad0b 100644 --- a/include/univ.i +++ b/include/univ.i @@ -93,6 +93,7 @@ some consistency checks to code. They use a little CPU time. */ #define UNIV_SYNC_PERF_STAT #define UNIV_SEARCH_PERF_STAT #define UNIV_SRV_PRINT_LATCH_WAITS; +#define UNIV_ZIP_DEBUG */ #define UNIV_LIGHT_MEM_DEBUG diff --git a/page/page0zip.c b/page/page0zip.c index fdfd9d480b3..8e160bd09b6 100644 --- a/page/page0zip.c +++ b/page/page0zip.c @@ -259,7 +259,9 @@ zlib_error: memset(page_zip->data + PAGE_DATA + c_stream.total_out, 0, c_stream.avail_out + 1); mem_heap_free(heap); - ut_ad(page_zip_validate(page_zip, page)); +#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG + ut_a(page_zip_validate(page_zip, page)); +#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */ return(TRUE); } @@ -740,7 +742,7 @@ zlib_error: return(TRUE); } -#ifdef UNIV_DEBUG +#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG /************************************************************************** Check that the compressed and decompressed pages match. */ @@ -763,7 +765,7 @@ page_zip_validate( buf_frame_free(temp_page); return(valid); } -#endif /* UNIV_DEBUG */ +#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */ /************************************************************************** Write data to the compressed portion of a page. The data must already @@ -806,8 +808,10 @@ page_zip_write( page_zip->m_end += length; ut_ad(!page_zip->data[page_zip->m_end]); ut_ad(page_zip->m_end + trailer_len < page_zip->size); - ut_ad(page_zip_validate(page_zip, +#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG + ut_a(page_zip_validate(page_zip, ut_align_down((byte*) str, UNIV_PAGE_SIZE))); +#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */ } #ifdef UNIV_DEBUG