From 80923f735553789cab27d0a6d68e77ea24d627bf Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Mon, 21 Dec 2015 15:31:17 +1100 Subject: [PATCH] Check algorithm=innodb on crc32 checksum fault before crc32(big endian) When a page has had its checksum fail and the algorithm = CRC32, its most likely because we've updated from 5.6 where the default was algorithm=innodb. We should test that algorithm innodb on the page passes before testing the crc32 in big endian way ( page_zip_calc_checksum(..., true)) as its more likely to be true. --- storage/innobase/page/page0zip.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index a16cce7..21f8c3f 100644 --- a/storage/innobase/page/page0zip.cc +++ b/storage/innobase/page/page0zip.cc @@ -5067,11 +5067,6 @@ page_zip_verify_checksum( return(TRUE); } - if (stored == page_zip_calc_checksum(data, size, curr_algo, - true)) { - return(TRUE); - } - if (stored == page_zip_calc_checksum( data, size, SRV_CHECKSUM_ALGORITHM_INNODB)) { @@ -5088,6 +5083,11 @@ page_zip_verify_checksum( return(TRUE); } + if (stored == page_zip_calc_checksum(data, size, curr_algo, + true)) { + return(TRUE); + } + break; case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB: case SRV_CHECKSUM_ALGORITHM_INNODB: