From 6cddd9c55142eec026405fa9f3d169a047f6f7b1 Mon Sep 17 00:00:00 2001 From: marko <> Date: Wed, 6 Aug 2008 08:44:17 +0000 Subject: [PATCH] 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. --- buf/buf0flu.c | 2 ++ buf/buf0lru.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/buf/buf0flu.c b/buf/buf0flu.c index c43b25ecf11..bd511869aaa 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -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; diff --git a/buf/buf0lru.c b/buf/buf0lru.c index 5a9de4eecbb..7922e885671 100644 --- a/buf/buf0lru.c +++ b/buf/buf0lru.c @@ -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; }