Commit 6e2fa8bc authored by marko's avatar marko

branches/zip: Stamp some header fields to compressed BLOB pages.

buf_flush_init_for_writing(): On FIL_PAGE_TYPE_ZBLOB, write to
page_zip->data instead of page.

page_zip_write_rec(), page_zip_write_blob_ptr(), page_zip_write_node_ptr():
Add ut_ad(page_simple_validate_new()).
parent 01103556
......@@ -495,10 +495,14 @@ buf_flush_init_for_writing(
switch (UNIV_EXPECT(fil_page_get_type(page), FIL_PAGE_INDEX)) {
case FIL_PAGE_TYPE_ZBLOB:
mach_write_to_4(page + FIL_PAGE_OFFSET, page_no);
mach_write_to_4(page + FIL_PAGE_ZBLOB_SPACE_ID, space);
mach_write_to_8(page + FIL_PAGE_LSN, newest_lsn);
mach_write_to_4(page + FIL_PAGE_SPACE_OR_CHKSUM,
mach_write_to_4(page_zip->data
+ FIL_PAGE_OFFSET, page_no);
mach_write_to_4(page_zip->data
+ FIL_PAGE_ZBLOB_SPACE_ID, space);
mach_write_to_8(page_zip->data
+ FIL_PAGE_LSN, newest_lsn);
mach_write_to_4(page_zip->data
+ FIL_PAGE_SPACE_OR_CHKSUM,
srv_use_checksums
? page_zip_calc_checksum(
page, zip_size)
......
......@@ -2111,6 +2111,7 @@ page_zip_write_rec(
page = ut_align_down((rec_t*) rec, UNIV_PAGE_SIZE);
ut_ad(page_zip_header_cmp(page_zip, page));
ut_ad(page_simple_validate_new(page));
slot = page_zip_dir_find(page_zip,
ut_align_offset(rec, UNIV_PAGE_SIZE));
......@@ -2402,6 +2403,7 @@ page_zip_write_blob_ptr(
ulint len;
ut_ad(buf_block_get_page_zip(buf_block_align((byte*)rec)) == page_zip);
ut_ad(page_simple_validate_new(page));
ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip->size > PAGE_DATA + page_zip_dir_size(page_zip));
ut_ad(rec_offs_comp(offsets));
......@@ -2555,6 +2557,7 @@ page_zip_write_node_ptr(
page_t* page = buf_frame_align(rec);
ut_ad(buf_block_get_page_zip(buf_block_align(rec)) == page_zip);
ut_ad(page_simple_validate_new(page));
ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip->size > PAGE_DATA + page_zip_dir_size(page_zip));
ut_ad(page_rec_is_comp(rec));
......@@ -2619,6 +2622,7 @@ page_zip_write_trx_id_and_roll_ptr(
ulint len;
ut_ad(buf_block_get_page_zip(buf_block_align(rec)) == page_zip);
ut_ad(page_simple_validate_new(page));
ut_ad(page_zip_simple_validate(page_zip));
ut_ad(page_zip->size > PAGE_DATA + page_zip_dir_size(page_zip));
ut_ad(rec_offs_validate(rec, NULL, offsets));
......
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