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.
This commit is contained in:
marko 2006-08-01 12:05:04 +00:00
parent 555c8af6ef
commit e4077d5651
2 changed files with 8 additions and 1 deletions

View file

@ -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:

View file

@ -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 */
}