diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-27 13:49:25 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-28 20:45:45 +0300 |
commit | a90100d756eb046814f5bba54d522f1574c131ba (patch) | |
tree | f0ef3db9f7176c01bed9b159af5ac0f44f9f3f97 /storage/innobase/page | |
parent | ba19764209dc2e2cb0a688cada02e15720d9242b (diff) | |
download | mariadb-git-a90100d756eb046814f5bba54d522f1574c131ba.tar.gz |
Replace univ_page_size and UNIV_PAGE_SIZE
Try to use one variable (srv_page_size) for innodb_page_size.
Also, replace UNIV_PAGE_SIZE_SHIFT with srv_page_size_shift.
Diffstat (limited to 'storage/innobase/page')
-rw-r--r-- | storage/innobase/page/page0cur.cc | 28 | ||||
-rw-r--r-- | storage/innobase/page/page0page.cc | 58 | ||||
-rw-r--r-- | storage/innobase/page/page0zip.cc | 82 |
3 files changed, 84 insertions, 84 deletions
diff --git a/storage/innobase/page/page0cur.cc b/storage/innobase/page/page0cur.cc index 2e78aa59c53..0b03939a4a2 100644 --- a/storage/innobase/page/page0cur.cc +++ b/storage/innobase/page/page0cur.cc @@ -849,7 +849,7 @@ page_cur_insert_rec_write_log( return; } - ut_a(rec_size < UNIV_PAGE_SIZE); + ut_a(rec_size < srv_page_size); ut_ad(mtr->is_named_space(index->table->space)); ut_ad(page_align(insert_rec) == page_align(cursor_rec)); ut_ad(!page_rec_is_comp(insert_rec) @@ -992,8 +992,8 @@ need_extra_info: /* Write the mismatch index */ log_ptr += mach_write_compressed(log_ptr, i); - ut_a(i < UNIV_PAGE_SIZE); - ut_a(extra_size < UNIV_PAGE_SIZE); + ut_a(i < srv_page_size); + ut_a(extra_size < srv_page_size); } else { /* Write the record end segment length and the extra info storage flag */ @@ -1010,7 +1010,7 @@ need_extra_info: mlog_close(mtr, log_ptr + rec_size); } else { mlog_close(mtr, log_ptr); - ut_a(rec_size < UNIV_PAGE_SIZE); + ut_a(rec_size < srv_page_size); mlog_catenate_string(mtr, ins_ptr, rec_size); } } @@ -1062,7 +1062,7 @@ page_cur_parse_insert_rec( cursor_rec = page + offset; - if (offset >= UNIV_PAGE_SIZE) { + if (offset >= srv_page_size) { recv_sys->found_corrupt_log = TRUE; @@ -1077,7 +1077,7 @@ page_cur_parse_insert_rec( return(NULL); } - if (end_seg_len >= UNIV_PAGE_SIZE << 1) { + if (end_seg_len >= srv_page_size << 1) { recv_sys->found_corrupt_log = TRUE; return(NULL); @@ -1101,7 +1101,7 @@ page_cur_parse_insert_rec( return(NULL); } - ut_a(origin_offset < UNIV_PAGE_SIZE); + ut_a(origin_offset < srv_page_size); mismatch_index = mach_parse_compressed(&ptr, end_ptr); @@ -1110,7 +1110,7 @@ page_cur_parse_insert_rec( return(NULL); } - ut_a(mismatch_index < UNIV_PAGE_SIZE); + ut_a(mismatch_index < srv_page_size); } if (end_ptr < ptr + (end_seg_len >> 1)) { @@ -1152,7 +1152,7 @@ page_cur_parse_insert_rec( /* Build the inserted record to buf */ - if (UNIV_UNLIKELY(mismatch_index >= UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(mismatch_index >= srv_page_size)) { ib::fatal() << "is_short " << is_short << ", " << "info_and_status_bits " << info_and_status_bits @@ -2066,9 +2066,9 @@ page_copy_rec_list_end_to_created_page( #ifdef UNIV_DEBUG /* To pass the debug tests we have to set these dummy values in the debug version */ - page_dir_set_n_slots(new_page, NULL, UNIV_PAGE_SIZE / 2); + page_dir_set_n_slots(new_page, NULL, srv_page_size / 2); page_header_set_ptr(new_page, NULL, PAGE_HEAP_TOP, - new_page + UNIV_PAGE_SIZE - 1); + new_page + srv_page_size - 1); #endif log_ptr = page_copy_rec_list_to_created_page_write_log(new_page, index, mtr); @@ -2133,7 +2133,7 @@ page_copy_rec_list_end_to_created_page( rec_size = rec_offs_size(offsets); - ut_ad(heap_top < new_page + UNIV_PAGE_SIZE); + ut_ad(heap_top < new_page + srv_page_size); heap_top += rec_size; @@ -2171,7 +2171,7 @@ page_copy_rec_list_end_to_created_page( log_data_len = mtr->get_log()->size() - log_data_len; - ut_a(log_data_len < 100 * UNIV_PAGE_SIZE); + ut_a(log_data_len < 100 * srv_page_size); if (log_ptr != NULL) { mach_write_to_4(log_ptr, log_data_len); @@ -2255,7 +2255,7 @@ page_cur_parse_delete_rec( offset = mach_read_from_2(ptr); ptr += 2; - ut_a(offset <= UNIV_PAGE_SIZE); + ut_a(offset <= srv_page_size); if (block) { page_t* page = buf_block_get_frame(block); diff --git a/storage/innobase/page/page0page.cc b/storage/innobase/page/page0page.cc index e3f2c967918..644fbe8e722 100644 --- a/storage/innobase/page/page0page.cc +++ b/storage/innobase/page/page0page.cc @@ -99,13 +99,13 @@ page_dir_find_owner_slot( while (rec_get_n_owned_new(r) == 0) { r = rec_get_next_ptr_const(r, TRUE); ut_ad(r >= page + PAGE_NEW_SUPREMUM); - ut_ad(r < page + (UNIV_PAGE_SIZE - PAGE_DIR)); + ut_ad(r < page + (srv_page_size - PAGE_DIR)); } } else { while (rec_get_n_owned_old(r) == 0) { r = rec_get_next_ptr_const(r, FALSE); ut_ad(r >= page + PAGE_OLD_SUPREMUM); - ut_ad(r < page + (UNIV_PAGE_SIZE - PAGE_DIR)); + ut_ad(r < page + (srv_page_size - PAGE_DIR)); } } @@ -387,10 +387,10 @@ page_create_low( sizeof infimum_supremum_compact); memset(page + PAGE_NEW_SUPREMUM_END, 0, - UNIV_PAGE_SIZE - PAGE_DIR - PAGE_NEW_SUPREMUM_END); - page[UNIV_PAGE_SIZE - PAGE_DIR - PAGE_DIR_SLOT_SIZE * 2 + 1] + srv_page_size - PAGE_DIR - PAGE_NEW_SUPREMUM_END); + page[srv_page_size - PAGE_DIR - PAGE_DIR_SLOT_SIZE * 2 + 1] = PAGE_NEW_SUPREMUM; - page[UNIV_PAGE_SIZE - PAGE_DIR - PAGE_DIR_SLOT_SIZE + 1] + page[srv_page_size - PAGE_DIR - PAGE_DIR_SLOT_SIZE + 1] = PAGE_NEW_INFIMUM; } else { page[PAGE_HEADER + PAGE_N_HEAP + 1] = PAGE_HEAP_NO_USER_LOW; @@ -399,10 +399,10 @@ page_create_low( sizeof infimum_supremum_redundant); memset(page + PAGE_OLD_SUPREMUM_END, 0, - UNIV_PAGE_SIZE - PAGE_DIR - PAGE_OLD_SUPREMUM_END); - page[UNIV_PAGE_SIZE - PAGE_DIR - PAGE_DIR_SLOT_SIZE * 2 + 1] + srv_page_size - PAGE_DIR - PAGE_OLD_SUPREMUM_END); + page[srv_page_size - PAGE_DIR - PAGE_DIR_SLOT_SIZE * 2 + 1] = PAGE_OLD_SUPREMUM; - page[UNIV_PAGE_SIZE - PAGE_DIR - PAGE_DIR_SLOT_SIZE + 1] + page[srv_page_size - PAGE_DIR - PAGE_DIR_SLOT_SIZE + 1] = PAGE_OLD_INFIMUM; } @@ -594,7 +594,7 @@ page_copy_rec_list_end_no_locks( btr_assert_not_corrupted(new_block, index); ut_a(page_is_comp(new_page) == page_rec_is_comp(rec)); - ut_a(mach_read_from_2(new_page + UNIV_PAGE_SIZE - 10) == (ulint) + ut_a(mach_read_from_2(new_page + srv_page_size - 10) == (ulint) (page_is_comp(new_page) ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM)); const bool is_leaf = page_is_leaf(block->frame); @@ -1052,7 +1052,7 @@ page_delete_rec_list_end( ulint* offsets = offsets_; rec_offs_init(offsets_); - ut_ad(size == ULINT_UNDEFINED || size < UNIV_PAGE_SIZE); + ut_ad(size == ULINT_UNDEFINED || size < srv_page_size); ut_ad(!page_zip || page_rec_is_comp(rec)); #ifdef UNIV_ZIP_DEBUG ut_a(!page_zip || page_zip_validate(page_zip, page, index)); @@ -1159,8 +1159,8 @@ delete_all: s = rec_offs_size(offsets); ut_ad(ulint(rec2 - page) + s - rec_offs_extra_size(offsets) - < UNIV_PAGE_SIZE); - ut_ad(size + s < UNIV_PAGE_SIZE); + < srv_page_size); + ut_ad(size + s < srv_page_size); size += s; n_recs++; @@ -1177,7 +1177,7 @@ delete_all: } } - ut_ad(size < UNIV_PAGE_SIZE); + ut_ad(size < srv_page_size); /* Update the page directory; there is no need to balance the number of the records owned by the supremum record, as it is allowed to be @@ -1632,7 +1632,7 @@ page_rec_get_nth_const( return(page_get_infimum_rec(page)); } - ut_ad(nth < UNIV_PAGE_SIZE / (REC_N_NEW_EXTRA_BYTES + 1)); + ut_ad(nth < srv_page_size / (REC_N_NEW_EXTRA_BYTES + 1)); for (i = 0;; i++) { @@ -1724,7 +1724,7 @@ page_rec_get_n_recs_before( n--; ut_ad(n >= 0); - ut_ad((ulong) n < UNIV_PAGE_SIZE / (REC_N_NEW_EXTRA_BYTES + 1)); + ut_ad((ulong) n < srv_page_size / (REC_N_NEW_EXTRA_BYTES + 1)); return((ulint) n); } @@ -2017,7 +2017,7 @@ page_simple_validate_old( n_slots = page_dir_get_n_slots(page); - if (UNIV_UNLIKELY(n_slots > UNIV_PAGE_SIZE / 4)) { + if (UNIV_UNLIKELY(n_slots > srv_page_size / 4)) { ib::error() << "Nonsensical number " << n_slots << " of page dir slots"; @@ -2093,7 +2093,7 @@ page_simple_validate_old( if (UNIV_UNLIKELY (rec_get_next_offs(rec, FALSE) < FIL_PAGE_DATA - || rec_get_next_offs(rec, FALSE) >= UNIV_PAGE_SIZE)) { + || rec_get_next_offs(rec, FALSE) >= srv_page_size)) { ib::error() << "Next record offset nonsensical " << rec_get_next_offs(rec, FALSE) << " for rec " @@ -2104,7 +2104,7 @@ page_simple_validate_old( count++; - if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(count > srv_page_size)) { ib::error() << "Page record list appears" " to be circular " << count; goto func_exit; @@ -2141,7 +2141,7 @@ page_simple_validate_old( while (rec != NULL) { if (UNIV_UNLIKELY(rec < page + FIL_PAGE_DATA - || rec >= page + UNIV_PAGE_SIZE)) { + || rec >= page + srv_page_size)) { ib::error() << "Free list record has" " a nonsensical offset " << (rec - page); @@ -2158,7 +2158,7 @@ page_simple_validate_old( count++; - if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(count > srv_page_size)) { ib::error() << "Page free list appears" " to be circular " << count; goto func_exit; @@ -2207,7 +2207,7 @@ page_simple_validate_new( n_slots = page_dir_get_n_slots(page); - if (UNIV_UNLIKELY(n_slots > UNIV_PAGE_SIZE / 4)) { + if (UNIV_UNLIKELY(n_slots > srv_page_size / 4)) { ib::error() << "Nonsensical number " << n_slots << " of page dir slots"; @@ -2284,7 +2284,7 @@ page_simple_validate_new( if (UNIV_UNLIKELY (rec_get_next_offs(rec, TRUE) < FIL_PAGE_DATA - || rec_get_next_offs(rec, TRUE) >= UNIV_PAGE_SIZE)) { + || rec_get_next_offs(rec, TRUE) >= srv_page_size)) { ib::error() << "Next record offset nonsensical " << rec_get_next_offs(rec, TRUE) @@ -2295,7 +2295,7 @@ page_simple_validate_new( count++; - if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(count > srv_page_size)) { ib::error() << "Page record list appears to be" " circular " << count; goto func_exit; @@ -2332,7 +2332,7 @@ page_simple_validate_new( while (rec != NULL) { if (UNIV_UNLIKELY(rec < page + FIL_PAGE_DATA - || rec >= page + UNIV_PAGE_SIZE)) { + || rec >= page + srv_page_size)) { ib::error() << "Free list record has" " a nonsensical offset " << page_offset(rec); @@ -2350,7 +2350,7 @@ page_simple_validate_new( count++; - if (UNIV_UNLIKELY(count > UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(count > srv_page_size)) { ib::error() << "Page free list appears to be" " circular " << count; goto func_exit; @@ -2440,12 +2440,12 @@ page_validate( ut_ad(srv_force_recovery >= SRV_FORCE_NO_UNDO_LOG_SCAN); } - heap = mem_heap_create(UNIV_PAGE_SIZE + 200); + heap = mem_heap_create(srv_page_size + 200); /* The following buffer is used to check that the records in the page record heap do not overlap */ - buf = static_cast<byte*>(mem_heap_zalloc(heap, UNIV_PAGE_SIZE)); + buf = static_cast<byte*>(mem_heap_zalloc(heap, srv_page_size)); /* Check first that the record heap and the directory do not overlap. */ @@ -2548,7 +2548,7 @@ page_validate( offs = page_offset(rec_get_start(rec, offsets)); i = rec_offs_size(offsets); - if (UNIV_UNLIKELY(offs + i >= UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(offs + i >= srv_page_size)) { ib::error() << "Record offset out of bounds"; goto func_exit; } @@ -2656,7 +2656,7 @@ n_owned_zero: count++; offs = page_offset(rec_get_start(rec, offsets)); i = rec_offs_size(offsets); - if (UNIV_UNLIKELY(offs + i >= UNIV_PAGE_SIZE)) { + if (UNIV_UNLIKELY(offs + i >= srv_page_size)) { ib::error() << "Record offset out of bounds"; goto func_exit; } diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index 1da423f46d8..84aa0f27f4f 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -695,7 +695,7 @@ page_zip_dir_encode( heap_no = rec_get_heap_no_new(rec); ut_a(heap_no >= PAGE_HEAP_NO_USER_LOW); ut_a(heap_no < n_heap); - ut_a(offs < UNIV_PAGE_SIZE - PAGE_DIR); + ut_a(offs < srv_page_size - PAGE_DIR); ut_a(offs >= PAGE_ZIP_START); #if PAGE_ZIP_DIR_SLOT_MASK & (PAGE_ZIP_DIR_SLOT_MASK + 1) # error PAGE_ZIP_DIR_SLOT_MASK is not 1 less than a power of 2 @@ -1296,7 +1296,7 @@ page_zip_compress( && dict_table_is_comp(index->table) && !dict_index_is_ibuf(index))); - UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_RW(page, srv_page_size); /* Check the data that will be omitted. */ ut_a(!memcmp(page + (PAGE_NEW_INFIMUM - REC_N_NEW_EXTRA_BYTES), @@ -1347,8 +1347,8 @@ page_zip_compress( if (logfile) { /* Write the uncompressed page to the log. */ - if (fwrite(page, 1, UNIV_PAGE_SIZE, logfile) - != UNIV_PAGE_SIZE) { + if (fwrite(page, 1, srv_page_size, logfile) + != srv_page_size) { perror("fwrite"); } /* Record the compressed size as zero. @@ -1407,7 +1407,7 @@ page_zip_compress( + REC_OFFS_HEADER_SIZE + n_dense * ((sizeof *recs) - PAGE_ZIP_DIR_SLOT_SIZE) - + UNIV_PAGE_SIZE * 4 + + srv_page_size * 4 + (512 << MAX_MEM_LEVEL)); recs = static_cast<const rec_t**>( @@ -1424,7 +1424,7 @@ page_zip_compress( page_zip_set_alloc(&c_stream, heap); err = deflateInit2(&c_stream, static_cast<int>(level), - Z_DEFLATED, UNIV_PAGE_SIZE_SHIFT, + Z_DEFLATED, srv_page_size_shift, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY); ut_a(err == Z_OK); @@ -1545,7 +1545,7 @@ page_zip_compress( c_stream.avail_in = static_cast<uInt>( page_header_get_field(page, PAGE_HEAP_TOP) - (c_stream.next_in - page)); - ut_a(c_stream.avail_in <= UNIV_PAGE_SIZE - PAGE_ZIP_START - PAGE_DIR); + ut_a(c_stream.avail_in <= srv_page_size - PAGE_ZIP_START - PAGE_DIR); UNIV_MEM_ASSERT_RW(c_stream.next_in, c_stream.avail_in); err = deflate(&c_stream, Z_FINISH); @@ -1623,7 +1623,7 @@ err_exit: /* Record the compressed size of the block. */ byte sz[4]; mach_write_to_4(sz, c_stream.total_out); - fseek(logfile, UNIV_PAGE_SIZE, SEEK_SET); + fseek(logfile, srv_page_size, SEEK_SET); if (fwrite(sz, 1, sizeof sz, logfile) != sizeof sz) { perror("fwrite"); } @@ -1820,7 +1820,7 @@ page_zip_dir_decode( /* Traverse the list of stored records in the sorting order, starting from the first user record. */ - slot = page + (UNIV_PAGE_SIZE - PAGE_DIR - PAGE_DIR_SLOT_SIZE); + slot = page + (srv_page_size - PAGE_DIR - PAGE_DIR_SLOT_SIZE); UNIV_PREFETCH_RW(slot); /* Zero out the page trailer. */ @@ -2326,7 +2326,7 @@ page_zip_decompress_node_ptrs( d_stream->avail_out = static_cast<uInt>( rec - REC_N_NEW_EXTRA_BYTES - d_stream->next_out); - ut_ad(d_stream->avail_out < UNIV_PAGE_SIZE + ut_ad(d_stream->avail_out < srv_page_size - PAGE_ZIP_START - PAGE_DIR); switch (inflate(d_stream, Z_SYNC_FLUSH)) { case Z_STREAM_END: @@ -2393,7 +2393,7 @@ page_zip_decompress_node_ptrs( d_stream->avail_out = static_cast<uInt>( page_header_get_field(page_zip->data, PAGE_HEAP_TOP) - page_offset(d_stream->next_out)); - if (UNIV_UNLIKELY(d_stream->avail_out > UNIV_PAGE_SIZE + if (UNIV_UNLIKELY(d_stream->avail_out > srv_page_size - PAGE_ZIP_START - PAGE_DIR)) { page_zip_fail(("page_zip_decompress_node_ptrs:" @@ -2548,7 +2548,7 @@ page_zip_decompress_sec( d_stream->avail_out = static_cast<uInt>( page_header_get_field(page_zip->data, PAGE_HEAP_TOP) - page_offset(d_stream->next_out)); - if (UNIV_UNLIKELY(d_stream->avail_out > UNIV_PAGE_SIZE + if (UNIV_UNLIKELY(d_stream->avail_out > srv_page_size - PAGE_ZIP_START - PAGE_DIR)) { page_zip_fail(("page_zip_decompress_sec:" @@ -2768,7 +2768,7 @@ page_zip_decompress_clust( d_stream->avail_out =static_cast<uInt>( rec - REC_N_NEW_EXTRA_BYTES - d_stream->next_out); - ut_ad(d_stream->avail_out < UNIV_PAGE_SIZE + ut_ad(d_stream->avail_out < srv_page_size - PAGE_ZIP_START - PAGE_DIR); err = inflate(d_stream, Z_SYNC_FLUSH); switch (err) { @@ -2878,7 +2878,7 @@ page_zip_decompress_clust( d_stream->avail_out = static_cast<uInt>( page_header_get_field(page_zip->data, PAGE_HEAP_TOP) - page_offset(d_stream->next_out)); - if (UNIV_UNLIKELY(d_stream->avail_out > UNIV_PAGE_SIZE + if (UNIV_UNLIKELY(d_stream->avail_out > srv_page_size - PAGE_ZIP_START - PAGE_DIR)) { page_zip_fail(("page_zip_decompress_clust:" @@ -3052,7 +3052,7 @@ page_zip_decompress_low( ulint* offsets; ut_ad(page_zip_simple_validate(page_zip)); - UNIV_MEM_ASSERT_W(page, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_W(page, srv_page_size); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); /* The dense directory excludes the infimum and supremum records. */ @@ -3065,7 +3065,7 @@ page_zip_decompress_low( return(FALSE); } - heap = mem_heap_create(n_dense * (3 * sizeof *recs) + UNIV_PAGE_SIZE); + heap = mem_heap_create(n_dense * (3 * sizeof *recs) + srv_page_size); recs = static_cast<rec_t**>( mem_heap_alloc(heap, n_dense * sizeof *recs)); @@ -3097,9 +3097,9 @@ page_zip_decompress_low( #ifdef UNIV_ZIP_DEBUG /* Clear the uncompressed page, except the header. */ - memset(PAGE_DATA + page, 0x55, UNIV_PAGE_SIZE - PAGE_DATA); + memset(PAGE_DATA + page, 0x55, srv_page_size - PAGE_DATA); #endif /* UNIV_ZIP_DEBUG */ - UNIV_MEM_INVALID(PAGE_DATA + page, UNIV_PAGE_SIZE - PAGE_DATA); + UNIV_MEM_INVALID(PAGE_DATA + page, srv_page_size - PAGE_DATA); /* Copy the page directory. */ if (UNIV_UNLIKELY(!page_zip_dir_decode(page_zip, page, recs, @@ -3132,9 +3132,9 @@ zlib_error: d_stream.avail_in = static_cast<uInt>( page_zip_get_size(page_zip) - (PAGE_DATA + 1)); d_stream.next_out = page + PAGE_ZIP_START; - d_stream.avail_out = uInt(UNIV_PAGE_SIZE - PAGE_ZIP_START); + d_stream.avail_out = uInt(srv_page_size - PAGE_ZIP_START); - if (UNIV_UNLIKELY(inflateInit2(&d_stream, UNIV_PAGE_SIZE_SHIFT) + if (UNIV_UNLIKELY(inflateInit2(&d_stream, srv_page_size_shift) != Z_OK)) { ut_error; } @@ -3229,7 +3229,7 @@ err_exit: } ut_a(page_is_comp(page)); - UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_RW(page, srv_page_size); page_zip_fields_free(index); mem_heap_free(heap); @@ -3345,7 +3345,7 @@ page_zip_validate_low( page_zip_fail(("page_zip_validate: page header\n")); page_zip_hexdump(page_zip, sizeof *page_zip); page_zip_hexdump(page_zip->data, page_zip_get_size(page_zip)); - page_zip_hexdump(page, UNIV_PAGE_SIZE); + page_zip_hexdump(page, srv_page_size); return(FALSE); } @@ -3356,11 +3356,11 @@ page_zip_validate_low( } /* page_zip_decompress() expects the uncompressed page to be - UNIV_PAGE_SIZE aligned. */ - temp_page_buf = static_cast<byte*>(ut_malloc_nokey(2 * UNIV_PAGE_SIZE)); - temp_page = static_cast<byte*>(ut_align(temp_page_buf, UNIV_PAGE_SIZE)); + srv_page_size aligned. */ + temp_page_buf = static_cast<byte*>(ut_malloc_nokey(2 * srv_page_size)); + temp_page = static_cast<byte*>(ut_align(temp_page_buf, srv_page_size)); - UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_RW(page, srv_page_size); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); temp_page_zip = *page_zip; @@ -3393,7 +3393,7 @@ page_zip_validate_low( valid = FALSE; } if (memcmp(page + PAGE_HEADER, temp_page + PAGE_HEADER, - UNIV_PAGE_SIZE - PAGE_HEADER - FIL_PAGE_DATA_END)) { + srv_page_size - PAGE_HEADER - FIL_PAGE_DATA_END)) { /* In crash recovery, the "minimum record" flag may be set incorrectly until the mini-transaction is @@ -3417,7 +3417,7 @@ page_zip_validate_low( if (!memcmp(page + PAGE_HEADER, temp_page + PAGE_HEADER, - UNIV_PAGE_SIZE - PAGE_HEADER + srv_page_size - PAGE_HEADER - FIL_PAGE_DATA_END)) { /* Only the minimum record flag @@ -3511,8 +3511,8 @@ func_exit: if (!valid) { page_zip_hexdump(page_zip, sizeof *page_zip); page_zip_hexdump(page_zip->data, page_zip_get_size(page_zip)); - page_zip_hexdump(page, UNIV_PAGE_SIZE); - page_zip_hexdump(temp_page, UNIV_PAGE_SIZE); + page_zip_hexdump(page, srv_page_size); + page_zip_hexdump(temp_page, srv_page_size); } ut_free(temp_page_buf); return(valid); @@ -3728,7 +3728,7 @@ page_zip_write_rec( } ut_ad(rec_get_start((rec_t*) rec, offsets) >= page + PAGE_ZIP_START); - ut_ad(rec_get_end((rec_t*) rec, offsets) <= page + UNIV_PAGE_SIZE + ut_ad(rec_get_end((rec_t*) rec, offsets) <= page + srv_page_size - PAGE_DIR - PAGE_DIR_SLOT_SIZE * page_dir_get_n_slots(page)); @@ -3894,8 +3894,8 @@ page_zip_parse_write_blob_ptr( z_offset = mach_read_from_2(ptr + 2); if (offset < PAGE_ZIP_START - || offset >= UNIV_PAGE_SIZE - || z_offset >= UNIV_PAGE_SIZE) { + || offset >= srv_page_size + || z_offset >= srv_page_size) { corrupt: recv_sys->found_corrupt_log = TRUE; @@ -4036,8 +4036,8 @@ page_zip_parse_write_node_ptr( z_offset = mach_read_from_2(ptr + 2); if (offset < PAGE_ZIP_START - || offset >= UNIV_PAGE_SIZE - || z_offset >= UNIV_PAGE_SIZE) { + || offset >= srv_page_size + || z_offset >= srv_page_size) { corrupt: recv_sys->found_corrupt_log = TRUE; @@ -4259,8 +4259,8 @@ page_zip_parse_write_trx_id( uint z_offset = mach_read_from_2(ptr + 2); if (offset < PAGE_ZIP_START - || offset >= UNIV_PAGE_SIZE - || z_offset >= UNIV_PAGE_SIZE) { + || offset >= srv_page_size + || z_offset >= srv_page_size) { corrupt: recv_sys->found_corrupt_log = TRUE; @@ -4778,7 +4778,7 @@ page_zip_reorganize( ut_ad(!dict_index_is_ibuf(index)); ut_ad(!dict_table_is_temporary(index->table)); /* Note that page_zip_validate(page_zip, page, index) may fail here. */ - UNIV_MEM_ASSERT_RW(page, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_RW(page, srv_page_size); UNIV_MEM_ASSERT_RW(page_zip->data, page_zip_get_size(page_zip)); /* Disable logging */ @@ -4866,9 +4866,9 @@ page_zip_copy_recs( ut_a(dict_index_is_clust(index)); } - UNIV_MEM_ASSERT_W(page, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_W(page, srv_page_size); UNIV_MEM_ASSERT_W(page_zip->data, page_zip_get_size(page_zip)); - UNIV_MEM_ASSERT_RW(src, UNIV_PAGE_SIZE); + UNIV_MEM_ASSERT_RW(src, srv_page_size); UNIV_MEM_ASSERT_RW(src_zip->data, page_zip_get_size(page_zip)); /* Copy those B-tree page header fields that are related to @@ -4881,7 +4881,7 @@ page_zip_copy_recs( memcpy(PAGE_HEADER + page, PAGE_HEADER + src, PAGE_HEADER_PRIV_END); memcpy(PAGE_DATA + page, PAGE_DATA + src, - UNIV_PAGE_SIZE - PAGE_DATA - FIL_PAGE_DATA_END); + srv_page_size - PAGE_DATA - FIL_PAGE_DATA_END); memcpy(PAGE_HEADER + page_zip->data, PAGE_HEADER + src_zip->data, PAGE_HEADER_PRIV_END); memcpy(PAGE_DATA + page_zip->data, PAGE_DATA + src_zip->data, |