Commit 0ca52c93 authored by marko's avatar marko

branches/zip: Define and use PAGE_ZIP_MATCH.

In UNIV_HOTBACKUP builds, assume fixed allocation.
parent 5aa2d678
...@@ -443,6 +443,14 @@ page_zip_calc_checksum( ...@@ -443,6 +443,14 @@ page_zip_calc_checksum(
ulint size) /* in: size of compressed page */ ulint size) /* in: size of compressed page */
__attribute__((nonnull)); __attribute__((nonnull));
#ifndef UNIV_HOTBACKUP
# define PAGE_ZIP_MATCH(ptr, page_zip) \
(buf_frame_get_page_zip(ptr) == (page_zip))
#else /* !UNIV_HOTBACKUP */
# define PAGE_ZIP_MATCH(ptr, page_zip) \
(page_align(ptr) + UNIV_PAGE_SIZE == (page_zip)->data)
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_MATERIALIZE #ifdef UNIV_MATERIALIZE
# undef UNIV_INLINE # undef UNIV_INLINE
# define UNIV_INLINE UNIV_INLINE_ORIGINAL # define UNIV_INLINE UNIV_INLINE_ORIGINAL
......
...@@ -374,7 +374,7 @@ page_zip_write_header( ...@@ -374,7 +374,7 @@ page_zip_write_header(
{ {
ulint pos; ulint pos;
ut_ad(buf_frame_get_page_zip(str) == page_zip); ut_ad(PAGE_ZIP_MATCH(str, page_zip));
ut_ad(page_zip_simple_validate(page_zip)); ut_ad(page_zip_simple_validate(page_zip));
UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip));
......
...@@ -3318,7 +3318,7 @@ page_zip_write_rec( ...@@ -3318,7 +3318,7 @@ page_zip_write_rec(
ulint heap_no; ulint heap_no;
byte* slot; byte* slot;
ut_ad(buf_frame_get_page_zip(rec) == page_zip); ut_ad(PAGE_ZIP_MATCH(rec, page_zip));
ut_ad(page_zip_simple_validate(page_zip)); ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip_get_size(page_zip) ut_ad(page_zip_get_size(page_zip)
> PAGE_DATA + page_zip_dir_size(page_zip)); > PAGE_DATA + page_zip_dir_size(page_zip));
...@@ -3568,7 +3568,7 @@ page_zip_write_blob_ptr( ...@@ -3568,7 +3568,7 @@ page_zip_write_blob_ptr(
ulint blob_no; ulint blob_no;
ulint len; ulint len;
ut_ad(buf_frame_get_page_zip(rec) == page_zip); ut_ad(PAGE_ZIP_MATCH(rec, page_zip));
ut_ad(page_simple_validate_new((page_t*) page)); ut_ad(page_simple_validate_new((page_t*) page));
ut_ad(page_zip_simple_validate(page_zip)); ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip_get_size(page_zip) ut_ad(page_zip_get_size(page_zip)
...@@ -3721,7 +3721,7 @@ page_zip_write_node_ptr( ...@@ -3721,7 +3721,7 @@ page_zip_write_node_ptr(
byte* storage; byte* storage;
page_t* page = page_align(rec); page_t* page = page_align(rec);
ut_ad(buf_frame_get_page_zip(rec) == page_zip); ut_ad(PAGE_ZIP_MATCH(rec, page_zip));
ut_ad(page_simple_validate_new(page)); ut_ad(page_simple_validate_new(page));
ut_ad(page_zip_simple_validate(page_zip)); ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip_get_size(page_zip) ut_ad(page_zip_get_size(page_zip)
...@@ -3788,7 +3788,7 @@ page_zip_write_trx_id_and_roll_ptr( ...@@ -3788,7 +3788,7 @@ page_zip_write_trx_id_and_roll_ptr(
page_t* page = page_align(rec); page_t* page = page_align(rec);
ulint len; ulint len;
ut_ad(buf_frame_get_page_zip(rec) == page_zip); ut_ad(PAGE_ZIP_MATCH(rec, page_zip));
ut_ad(page_simple_validate_new(page)); ut_ad(page_simple_validate_new(page));
ut_ad(page_zip_simple_validate(page_zip)); ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip_get_size(page_zip) ut_ad(page_zip_get_size(page_zip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment