mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
MDEV-11614: Syslog messages: "InnoDB: Log sequence number
at the start 759654123 and the end 0 do not match." For page compressed and encrypted tables log sequence number at end is not stored, thus disable this message for them.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved.
|
||||
Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -642,8 +642,12 @@ buf_page_is_corrupted(
|
||||
ulint checksum_field2;
|
||||
ulint space_id = mach_read_from_4(
|
||||
read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
|
||||
ulint page_type = mach_read_from_4(
|
||||
read_buf + FIL_PAGE_TYPE);
|
||||
bool no_checksum = (page_type == FIL_PAGE_PAGE_COMPRESSED ||
|
||||
page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
|
||||
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space_id);
|
||||
bool page_encrypted = false;
|
||||
|
||||
|
||||
/* Page is encrypted if encryption information is found from
|
||||
tablespace and page contains used key_version. This is true
|
||||
@@ -651,10 +655,15 @@ buf_page_is_corrupted(
|
||||
if (crypt_data &&
|
||||
crypt_data->type != CRYPT_SCHEME_UNENCRYPTED &&
|
||||
fil_page_is_encrypted(read_buf)) {
|
||||
page_encrypted = true;
|
||||
no_checksum = true;
|
||||
}
|
||||
|
||||
if (!page_encrypted && !zip_size
|
||||
/* Return early if there is no checksum or END_LSN */
|
||||
if (no_checksum) {
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (!no_checksum && !zip_size
|
||||
&& memcmp(read_buf + FIL_PAGE_LSN + 4,
|
||||
read_buf + UNIV_PAGE_SIZE
|
||||
- FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) {
|
||||
@@ -713,10 +722,6 @@ buf_page_is_corrupted(
|
||||
return(!page_zip_verify_checksum(read_buf, zip_size));
|
||||
}
|
||||
|
||||
if (page_encrypted) {
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
checksum_field1 = mach_read_from_4(
|
||||
read_buf + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2008, Google Inc.
|
||||
Copyright (c) 2013, 2016, MariaDB Corporation. All Rights Reserved.
|
||||
Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved.
|
||||
|
||||
Portions of this file contain modifications contributed and copyrighted by
|
||||
Google, Inc. Those modifications are gratefully acknowledged and are described
|
||||
@@ -707,8 +707,12 @@ buf_page_is_corrupted(
|
||||
ulint checksum_field2;
|
||||
ulint space_id = mach_read_from_4(
|
||||
read_buf + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID);
|
||||
ulint page_type = mach_read_from_4(
|
||||
read_buf + FIL_PAGE_TYPE);
|
||||
bool no_checksum = (page_type == FIL_PAGE_PAGE_COMPRESSED ||
|
||||
page_type == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED);
|
||||
fil_space_crypt_t* crypt_data = fil_space_get_crypt_data(space_id);
|
||||
bool page_encrypted = false;
|
||||
|
||||
|
||||
/* Page is encrypted if encryption information is found from
|
||||
tablespace and page contains used key_version. This is true
|
||||
@@ -716,10 +720,15 @@ buf_page_is_corrupted(
|
||||
if (crypt_data &&
|
||||
crypt_data->type != CRYPT_SCHEME_UNENCRYPTED &&
|
||||
fil_page_is_encrypted(read_buf)) {
|
||||
page_encrypted = true;
|
||||
no_checksum = true;
|
||||
}
|
||||
|
||||
if (!page_encrypted && !zip_size
|
||||
/* Return early if there is no checksum or END_LSN */
|
||||
if (no_checksum) {
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (!no_checksum && !zip_size
|
||||
&& memcmp(read_buf + FIL_PAGE_LSN + 4,
|
||||
read_buf + UNIV_PAGE_SIZE
|
||||
- FIL_PAGE_END_LSN_OLD_CHKSUM + 4, 4)) {
|
||||
@@ -778,10 +787,6 @@ buf_page_is_corrupted(
|
||||
return(!page_zip_verify_checksum(read_buf, zip_size));
|
||||
}
|
||||
|
||||
if (page_encrypted) {
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
checksum_field1 = mach_read_from_4(
|
||||
read_buf + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user