diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-01-31 21:48:47 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-01-31 21:48:47 +0100 |
commit | 4b21cd21fef2763d757aa15681c9c9a7ed5db3c9 (patch) | |
tree | e9e233392b47f93de12cecce1f7f403ce26057b0 /storage/xtradb/page | |
parent | 0b049b40124d72d77c008d4441e4db2e77f0f127 (diff) | |
parent | a06624d61f36c70edd63adcfe2803bb7a8564de5 (diff) | |
download | mariadb-git-4b21cd21fef2763d757aa15681c9c9a7ed5db3c9.tar.gz |
Merge branch '10.0' into merge-wip
Diffstat (limited to 'storage/xtradb/page')
-rw-r--r-- | storage/xtradb/page/page0zip.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/xtradb/page/page0zip.cc b/storage/xtradb/page/page0zip.cc index 1991d01ce48..9ad39147d0d 100644 --- a/storage/xtradb/page/page0zip.cc +++ b/storage/xtradb/page/page0zip.cc @@ -4918,8 +4918,15 @@ page_zip_verify_checksum( stored = static_cast<ib_uint32_t>(mach_read_from_4( static_cast<const unsigned char*>(data) + FIL_PAGE_SPACE_OR_CHKSUM)); - /* declare empty pages non-corrupted */ - if (stored == 0) { +#if FIL_PAGE_LSN % 8 +#error "FIL_PAGE_LSN must be 64 bit aligned" +#endif + + /* Check if page is empty */ + if (stored == 0 + && *reinterpret_cast<const ib_uint64_t*>(static_cast<const char*>( + data) + + FIL_PAGE_LSN) == 0) { /* make sure that the page is really empty */ ulint i; for (i = 0; i < size; i++) { @@ -4927,7 +4934,7 @@ page_zip_verify_checksum( return(FALSE); } } - + /* Empty page */ return(TRUE); } |