Commit b43effdd authored by marko's avatar marko

branches/zip: Add assertions.

btr_compress(): Invoke page_zip_validate() on the page being compressed.

recv_parse_or_apply_log_rec_body(): Assert that MLOG_WRITE_STRING is
never used on compressed B-tree pages.
parent b857a02b
...@@ -2303,7 +2303,11 @@ btr_compress( ...@@ -2303,7 +2303,11 @@ btr_compress(
merge_page_zip = buf_block_get_page_zip(buf_block_align(merge_page)); merge_page_zip = buf_block_get_page_zip(buf_block_align(merge_page));
#if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG #if defined UNIV_DEBUG || defined UNIV_ZIP_DEBUG
ut_a(!merge_page_zip || page_zip_validate(merge_page_zip, merge_page)); 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_DEBUG || UNIV_ZIP_DEBUG */
/* Move records to the merge page */ /* Move records to the merge page */
......
...@@ -886,6 +886,7 @@ recv_parse_or_apply_log_rec_body( ...@@ -886,6 +886,7 @@ recv_parse_or_apply_log_rec_body(
ptr = fsp_parse_init_file_page(ptr, end_ptr, page); ptr = fsp_parse_init_file_page(ptr, end_ptr, page);
break; break;
case MLOG_WRITE_STRING: case MLOG_WRITE_STRING:
ut_a(!page_zip || fil_page_get_type(page) != FIL_PAGE_INDEX);
ptr = mlog_parse_string(ptr, end_ptr, page); ptr = mlog_parse_string(ptr, end_ptr, page);
break; break;
case MLOG_FILE_CREATE: case MLOG_FILE_CREATE:
......
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