Commit 94a7cee3 authored by marko's avatar marko

branches/zip: Improve the diagnostics for tracking down issue#63 and issue#65.

buf_flush_init_for_writing(), buf_LRU_block_remove_hashed_page():
Dump the page frame featuring the incorrect FIL_PAGE_TYPE along with the
page_zip->data that might contain an earlier version of the page.
parent 07315cdb
......@@ -638,6 +638,8 @@ buf_flush_init_for_writing(
ut_print_timestamp(stderr);
fputs(" InnoDB: ERROR: The compressed page to be written"
" seems corrupt:", stderr);
ut_print_buf(stderr, page, zip_size);
fputs("\nInnoDB: Possibly older version of the page:", stderr);
ut_print_buf(stderr, page_zip->data, zip_size);
putc('\n', stderr);
ut_error;
......
......@@ -1455,6 +1455,8 @@ buf_LRU_block_remove_hashed_page(
buf_block_modify_clock_inc((buf_block_t*) bpage);
if (bpage->zip.data) {
const page_t* page = ((buf_block_t*) bpage)->frame;
const ulint zip_size
= page_zip_get_size(&bpage->zip);
ut_a(!zip || bpage->oldest_modification == 0);
......@@ -1472,7 +1474,7 @@ buf_LRU_block_remove_hashed_page(
to the compressed page, which will
be preserved. */
memcpy(bpage->zip.data, page,
page_zip_get_size(&bpage->zip));
zip_size);
}
break;
case FIL_PAGE_TYPE_ZBLOB:
......@@ -1487,8 +1489,11 @@ buf_LRU_block_remove_hashed_page(
ut_print_timestamp(stderr);
fputs(" InnoDB: ERROR: The compressed page"
" to be evicted seems corrupt:", stderr);
ut_print_buf(stderr, page, zip_size);
fputs("\nInnoDB: Possibly older version"
" of the page:", stderr);
ut_print_buf(stderr, bpage->zip.data,
page_zip_get_size(&bpage->zip));
zip_size);
putc('\n', stderr);
ut_error;
}
......
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