Commit fbce3ef8 authored by marko's avatar marko

branches/zip: buf_flush_init_for_writing(): Invoke page_zip_calc_checksum()

on page_zip->data, so that the freshly written fields will be included.

page_cur_delete_rec(): Add a page_zip_validate() assertion to the end.
parent b6b5f3bb
......@@ -495,6 +495,8 @@ buf_flush_init_for_writing(
switch (UNIV_EXPECT(fil_page_get_type(page), FIL_PAGE_INDEX)) {
case FIL_PAGE_TYPE_ZBLOB:
ut_ad(fil_page_get_type(page_zip->data)
== FIL_PAGE_TYPE_ZBLOB);
mach_write_to_4(page_zip->data
+ FIL_PAGE_OFFSET, page_no);
mach_write_to_4(page_zip->data
......@@ -505,7 +507,8 @@ buf_flush_init_for_writing(
+ FIL_PAGE_SPACE_OR_CHKSUM,
srv_use_checksums
? page_zip_calc_checksum(
page, zip_size)
page_zip->data,
zip_size)
: BUF_NO_CHECKSUM_MAGIC);
return;
case FIL_PAGE_TYPE_ALLOCATED:
......
......@@ -1590,4 +1590,8 @@ page_cur_delete_rec(
if (UNIV_UNLIKELY(cur_n_owned <= PAGE_DIR_SLOT_MIN_N_OWNED)) {
page_dir_balance_slot(page, page_zip, cur_slot_no);
}
#ifdef UNIV_ZIP_DEBUG
ut_a(!page_zip || page_zip_validate(page_zip, page));
#endif /* UNIV_ZIP_DEBUG */
}
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