Permalink
Browse files

Bug #21086723 PAGE_ZIP_VERIFY_CHECKSUM() RETURNS FALSE FOR A

		VALID COMPRESSED PAGE

PROBLEM

While copying the dirty page from uncompressed page to a compressed page
we call page_zip_verify_checksum() before setting the LSN of the
compressed page,because of this LSN of compressed page is zero and if
the calculated checksum also is zero (which can happen for a valid page)
we think it is empty page and assert.

FIX

Move page_zip_verify_checksum() after setting the LSN of compressed page.
Since checksum algorithm will not consider the change in header while
calculating the checksum,this will not effect the checksum calculation.
  • Loading branch information...
Aditya A
Aditya A committed May 20, 2015
1 parent 9447090 commit 5b6041b2c7cbee8a1d917631d3a051122b8c4f8d
Showing with 3 additions and 3 deletions.
  1. +3 −3 storage/innobase/buf/buf0flu.cc
@@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -929,11 +929,11 @@ buf_flush_write_block_low(
break;
case BUF_BLOCK_ZIP_DIRTY:
frame = bpage->zip.data;
mach_write_to_8(frame + FIL_PAGE_LSN,
bpage->newest_modification);
ut_a(page_zip_verify_checksum(frame, zip_size));
mach_write_to_8(frame + FIL_PAGE_LSN,
bpage->newest_modification);
memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8);
break;
case BUF_BLOCK_FILE_PAGE:

0 comments on commit 5b6041b

Please sign in to comment.