mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
branches/zip: Make page_zip_validate() independent of UNIV_DEBUG.
Replace most occurrences of #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG with #ifdef UNIV_ZIP_DEBUG.
This commit is contained in:
parent
0d5392310b
commit
7bc09e8c18
7 changed files with 82 additions and 82 deletions
|
@ -877,9 +877,9 @@ btr_page_reorganize_low(
|
|||
ut_ad(mtr_memo_contains(mtr, buf_block_align(page),
|
||||
MTR_MEMO_PAGE_X_FIX));
|
||||
ut_ad(!!page_is_comp(page) == dict_table_is_comp(index->table));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
data_size1 = page_get_data_size(page);
|
||||
max_ins_size1 = page_get_max_insert_size_after_reorganize(page, 1);
|
||||
|
||||
|
@ -948,9 +948,9 @@ btr_page_reorganize_low(
|
|||
}
|
||||
|
||||
func_exit:
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
buf_frame_free(temp_page);
|
||||
|
||||
/* Restore logging mode */
|
||||
|
@ -1015,9 +1015,9 @@ btr_page_empty(
|
|||
{
|
||||
ut_ad(mtr_memo_contains(mtr, buf_block_align(page),
|
||||
MTR_MEMO_PAGE_X_FIX));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
btr_search_drop_page_hash_index(page);
|
||||
|
||||
|
@ -1069,9 +1069,9 @@ btr_root_raise_and_insert(
|
|||
|
||||
root = btr_cur_get_page(cursor);
|
||||
root_page_zip = buf_block_get_page_zip(buf_block_align(root));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!root_page_zip || page_zip_validate(root_page_zip, root));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
tree = btr_cur_get_tree(cursor);
|
||||
|
||||
ut_ad(dict_tree_get_page(tree) == buf_frame_get_page_no(root));
|
||||
|
@ -1882,10 +1882,10 @@ func_start:
|
|||
rec = page_cur_tuple_insert(page_cursor, insert_page_zip,
|
||||
tuple, cursor->index, ext, n_ext, mtr);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!insert_page_zip
|
||||
|| page_zip_validate(insert_page_zip, insert_page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (UNIV_LIKELY(rec != NULL)) {
|
||||
/* Insert fit on the page: update the free bits for the
|
||||
|
@ -2135,10 +2135,10 @@ btr_lift_page_up(
|
|||
father_page = buf_frame_align(
|
||||
btr_page_get_father_node_ptr(tree, page, mtr));
|
||||
father_page_zip = buf_block_get_page_zip(buf_block_align(father_page));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!father_page_zip
|
||||
|| page_zip_validate(father_page_zip, father_page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
page_level = btr_page_get_level(page, mtr);
|
||||
index = tree->tree_index;
|
||||
|
@ -2302,13 +2302,13 @@ btr_compress(
|
|||
}
|
||||
|
||||
merge_page_zip = buf_block_get_page_zip(buf_block_align(merge_page));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
if (UNIV_LIKELY_NULL(merge_page_zip)) {
|
||||
ut_a(page_zip_validate(merge_page_zip, merge_page));
|
||||
ut_a(page_zip_validate(buf_block_get_page_zip(
|
||||
buf_block_align(page)), page));
|
||||
}
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
/* Move records to the merge page */
|
||||
if (is_left) {
|
||||
|
@ -2538,14 +2538,14 @@ btr_discard_page(
|
|||
|
||||
/* Remove the page from the level list */
|
||||
btr_level_list_remove(tree, page, mtr);
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
{
|
||||
page_zip_des_t* merge_page_zip = buf_block_get_page_zip(
|
||||
buf_block_align(merge_page));
|
||||
ut_a(!merge_page_zip
|
||||
|| page_zip_validate(merge_page_zip, merge_page));
|
||||
}
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (left_page_no != FIL_NULL) {
|
||||
lock_update_discard(page_get_supremum_rec(merge_page), page);
|
||||
|
@ -2970,9 +2970,9 @@ btr_validate_level(
|
|||
mem_heap_t* heap = mem_heap_create(256);
|
||||
ulint* offsets = NULL;
|
||||
ulint* offsets2= NULL;
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
page_zip_des_t* page_zip;
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
|
@ -2985,10 +2985,10 @@ btr_validate_level(
|
|||
index = tree->tree_index;
|
||||
|
||||
while (level != btr_page_get_level(page, &mtr)) {
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
page_zip = buf_block_get_page_zip(buf_block_align(page));
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
ut_a(!page_is_leaf(page));
|
||||
|
||||
page_cur_set_before_first(page, &cursor);
|
||||
|
@ -3012,10 +3012,10 @@ loop:
|
|||
offsets = offsets2 = NULL;
|
||||
mtr_x_lock(dict_tree_get_lock(tree), &mtr);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
page_zip = buf_block_get_page_zip(buf_block_align(page));
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
/* Check ordering etc. of records */
|
||||
|
||||
|
|
|
@ -501,10 +501,10 @@ retry_page_get:
|
|||
|
||||
block = buf_block_align(page);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!buf_block_get_page_zip(block) || page_zip_validate(
|
||||
buf_block_get_page_zip(block), page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
block->check_index_page_at_flush = TRUE;
|
||||
|
||||
|
@ -1767,9 +1767,9 @@ btr_cur_optimistic_update(
|
|||
new_rec_size = rec_get_converted_size(index, new_entry);
|
||||
|
||||
page_zip = buf_block_get_page_zip(buf_block_align(page));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (UNIV_LIKELY_NULL(page_zip)
|
||||
&& !page_zip_alloc(page_zip, page, index,
|
||||
|
@ -1972,9 +1972,9 @@ btr_cur_pessimistic_update(
|
|||
MTR_MEMO_X_LOCK));
|
||||
ut_ad(mtr_memo_contains(mtr, buf_block_align(page),
|
||||
MTR_MEMO_PAGE_X_FIX));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
optim_err = btr_cur_optimistic_update(flags, cursor, update,
|
||||
cmpl_info, thr, mtr);
|
||||
|
@ -2092,9 +2092,9 @@ btr_cur_pessimistic_update(
|
|||
|
||||
btr_search_update_hash_on_delete(cursor);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
page_cur_delete_rec(page_cursor, index, offsets, page_zip, mtr);
|
||||
|
||||
page_cur_move_to_prev(page_cursor);
|
||||
|
@ -2624,14 +2624,14 @@ btr_cur_optimistic_delete(
|
|||
1);
|
||||
page_zip = buf_block_get_page_zip(buf_block_align(
|
||||
btr_cur_get_rec(cursor)));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUGp
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
page_cur_delete_rec(btr_cur_get_page_cur(cursor),
|
||||
cursor->index, offsets, page_zip, mtr);
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUGp
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
ibuf_update_free_bits_low(cursor->index, page, max_ins_size,
|
||||
mtr);
|
||||
|
@ -2712,9 +2712,9 @@ btr_cur_pessimistic_delete(
|
|||
heap = mem_heap_create(1024);
|
||||
rec = btr_cur_get_rec(cursor);
|
||||
page_zip = buf_block_get_page_zip(buf_block_align(page));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
offsets = rec_get_offsets(rec, cursor->index,
|
||||
NULL, ULINT_UNDEFINED, &heap);
|
||||
|
@ -2727,9 +2727,9 @@ btr_cur_pessimistic_delete(
|
|||
|| !rec_get_1byte_offs_flag(rec))) {
|
||||
btr_rec_free_externally_stored_fields(cursor->index, rec,
|
||||
offsets, page_zip, in_rollback, mtr);
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUGp
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
}
|
||||
|
||||
if (UNIV_UNLIKELY(page_get_n_recs(page) < 2)
|
||||
|
@ -2790,9 +2790,9 @@ btr_cur_pessimistic_delete(
|
|||
|
||||
page_cur_delete_rec(btr_cur_get_page_cur(cursor), cursor->index,
|
||||
offsets, page_zip, mtr);
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUGp
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
ut_ad(btr_check_node_ptr(tree, page, mtr));
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ page_zip_simple_validate(
|
|||
descriptor */
|
||||
#endif /* UNIV_DEBUG */
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
/**************************************************************************
|
||||
Check that the compressed and decompressed pages match. */
|
||||
|
||||
|
@ -79,7 +79,7 @@ page_zip_validate(
|
|||
const page_zip_des_t* page_zip,/* in: compressed page */
|
||||
const page_t* page) /* in: uncompressed page */
|
||||
__attribute__((nonnull));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
/**************************************************************************
|
||||
Ensure that enough space is available in the modification log.
|
||||
|
|
|
@ -160,9 +160,9 @@ page_zip_alloc(
|
|||
mtr_t* mtr) /* in: mini-transaction, or NULL */
|
||||
{
|
||||
ut_ad(page_is_comp((page_t*) page));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (page_zip_available(page_zip, index, length, create)) {
|
||||
return(TRUE);
|
||||
|
|
|
@ -250,11 +250,11 @@ page_cur_search_with_match(
|
|||
ut_ad((mode == PAGE_CUR_L) || (mode == PAGE_CUR_LE)
|
||||
|| (mode == PAGE_CUR_G) || (mode == PAGE_CUR_GE));
|
||||
#endif /* UNIV_DEBUG */
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
page_zip_des_t* page_zip = buf_block_get_page_zip(
|
||||
buf_block_align(page));
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
page_check_dir(page);
|
||||
|
||||
|
@ -917,9 +917,9 @@ page_cur_insert_rec_low(
|
|||
== (ibool) !!page_is_comp(page));
|
||||
|
||||
ut_ad(!page_rec_is_supremum(cursor->rec));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
/* 1. Get the size of the physical record in the page */
|
||||
rec_size = rec_offs_size(offsets);
|
||||
|
|
|
@ -838,9 +838,9 @@ page_delete_rec_list_end(
|
|||
|
||||
ut_ad(size == ULINT_UNDEFINED || size < UNIV_PAGE_SIZE);
|
||||
ut_ad(!page_zip || page_rec_is_comp(rec));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (page_rec_is_infimum(rec)) {
|
||||
rec = page_rec_get_next(rec);
|
||||
|
@ -1005,10 +1005,10 @@ page_delete_rec_list_start(
|
|||
|
||||
ut_ad((ibool) !!page_rec_is_comp(rec)
|
||||
== dict_table_is_comp(index->table));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!page_zip || page_zip_validate(page_zip,
|
||||
ut_align_down(rec, UNIV_PAGE_SIZE)));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (page_rec_is_infimum(rec)) {
|
||||
|
||||
|
@ -1071,11 +1071,11 @@ page_move_rec_list_end(
|
|||
|
||||
old_data_size = page_get_data_size(new_page);
|
||||
old_n_recs = page_get_n_recs(new_page);
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(!new_page_zip || page_zip_validate(new_page_zip, new_page));
|
||||
ut_a(!page_zip || page_zip_validate(page_zip,
|
||||
ut_align_down(split_rec, UNIV_PAGE_SIZE)));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (UNIV_UNLIKELY(!page_copy_rec_list_end(new_page, new_page_zip,
|
||||
split_rec, index, mtr))) {
|
||||
|
|
|
@ -196,9 +196,9 @@ page_zip_compress_write_log(
|
|||
byte* log_ptr;
|
||||
ulint trailer_size;
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
log_ptr = mlog_open(mtr, 11 + 2 + 2);
|
||||
|
||||
|
@ -992,9 +992,9 @@ zlib_error:
|
|||
/* Copy the rest of the compressed page */
|
||||
memcpy(page_zip->data + PAGE_DATA, buf, page_zip->size - PAGE_DATA);
|
||||
mem_heap_free(heap);
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (mtr) {
|
||||
page_zip_compress_write_log(page_zip, page, index, mtr);
|
||||
|
@ -1965,7 +1965,7 @@ recs_done:
|
|||
return(TRUE);
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
/* Flag: make page_zip_validate() compare page headers only */
|
||||
ibool page_zip_validate_header_only = FALSE;
|
||||
|
||||
|
@ -2039,7 +2039,7 @@ func_exit:
|
|||
buf_frame_free(temp_page);
|
||||
return(valid);
|
||||
}
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
#ifdef UNIV_DEBUG
|
||||
static
|
||||
|
@ -2294,10 +2294,10 @@ page_zip_write_rec(
|
|||
ut_a(!*data);
|
||||
page_zip->m_end = data - page_zip->data;
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip,
|
||||
ut_align_down((byte*) rec, UNIV_PAGE_SIZE)));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
}
|
||||
|
||||
/***************************************************************
|
||||
|
@ -2341,18 +2341,18 @@ corrupt:
|
|||
goto corrupt;
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
memcpy(page + offset,
|
||||
ptr + 4, BTR_EXTERN_FIELD_REF_SIZE);
|
||||
memcpy(page_zip->data + z_offset,
|
||||
ptr + 4, BTR_EXTERN_FIELD_REF_SIZE);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
}
|
||||
|
||||
return(ptr + (2 + 2 + BTR_EXTERN_FIELD_REF_SIZE));
|
||||
|
@ -2415,10 +2415,10 @@ page_zip_write_blob_ptr(
|
|||
|
||||
memcpy(externs, field, BTR_EXTERN_FIELD_REF_SIZE);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip,
|
||||
ut_align_down((rec_t*) rec, UNIV_PAGE_SIZE)));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
if (mtr) {
|
||||
byte* log_ptr = mlog_open(mtr,
|
||||
|
@ -2486,9 +2486,9 @@ corrupt:
|
|||
goto corrupt;
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
field = page + offset;
|
||||
storage = page_zip->data + z_offset;
|
||||
|
@ -2509,9 +2509,9 @@ corrupt:
|
|||
memcpy(field, ptr + 4, REC_NODE_PTR_SIZE);
|
||||
memcpy(storage, ptr + 4, REC_NODE_PTR_SIZE);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
}
|
||||
|
||||
return(ptr + (2 + 2 + REC_NODE_PTR_SIZE));
|
||||
|
@ -2701,9 +2701,9 @@ page_zip_clear_rec(
|
|||
*data++ = (heap_no - 1) << 1 | 1;
|
||||
ut_ad(!*data);
|
||||
page_zip->m_end = data - page_zip->data;
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
} else {
|
||||
/* There is not enough space to log the clearing.
|
||||
Try to clear the block and to recompress the page. */
|
||||
|
@ -2975,16 +2975,16 @@ corrupt:
|
|||
|
||||
goto corrupt;
|
||||
}
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
memcpy(page + offset, ptr, len);
|
||||
memcpy(page_zip->data + offset, ptr, len);
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
}
|
||||
|
||||
return(ptr + len);
|
||||
|
@ -3109,9 +3109,9 @@ page_zip_copy(
|
|||
MTR_MEMO_PAGE_X_FIX));
|
||||
ut_ad(mtr_memo_contains(mtr, buf_block_align((page_t*) src),
|
||||
MTR_MEMO_PAGE_X_FIX));
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(src_zip, src));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
ut_a(page_zip->size == src_zip->size);
|
||||
|
||||
/* Skip the file page header and trailer. */
|
||||
|
@ -3142,9 +3142,9 @@ page_zip_copy(
|
|||
}
|
||||
}
|
||||
|
||||
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
|
||||
#ifdef UNIV_ZIP_DEBUG
|
||||
ut_a(page_zip_validate(page_zip, page));
|
||||
#endif /* UNIV_DEBUG || UNIV_ZIP_DEBUG */
|
||||
#endif /* UNIV_ZIP_DEBUG */
|
||||
|
||||
page_zip_compress_write_log(page_zip, page, index, mtr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue