Skip to content

Commit 5b6041b

Browse files
author
Aditya A
committed
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.
1 parent 9447090 commit 5b6041b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

storage/innobase/buf/buf0flu.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2013, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -929,11 +929,11 @@ buf_flush_write_block_low(
929929
break;
930930
case BUF_BLOCK_ZIP_DIRTY:
931931
frame = bpage->zip.data;
932+
mach_write_to_8(frame + FIL_PAGE_LSN,
933+
bpage->newest_modification);
932934

933935
ut_a(page_zip_verify_checksum(frame, zip_size));
934936

935-
mach_write_to_8(frame + FIL_PAGE_LSN,
936-
bpage->newest_modification);
937937
memset(frame + FIL_PAGE_FILE_FLUSH_LSN, 0, 8);
938938
break;
939939
case BUF_BLOCK_FILE_PAGE:

0 commit comments

Comments
 (0)