summaryrefslogtreecommitdiff
path: root/storage/xtradb/buf/buf0buf.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-02-03 17:22:05 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-02-03 17:22:05 +0200
commita249e57b684a23dce4cbb870ca3eb30c77cb9fd6 (patch)
tree9c50673311474f7efa0d5d110461ad324c7a62e6 /storage/xtradb/buf/buf0buf.cc
parent261ce5286f266f1a5fab5e8adc2c08adef658d13 (diff)
parent955c7b32226c816b24a2ed1750e12bc0256565ad (diff)
downloadmariadb-git-a249e57b684a23dce4cbb870ca3eb30c77cb9fd6.tar.gz
Merge 10.1 into 10.2
Temporarily disable a test for commit 2175bfce3e9da8332f10ab0e0286dc93915533a2 because fixing it in 10.2 requires updating libmariadb.
Diffstat (limited to 'storage/xtradb/buf/buf0buf.cc')
-rw-r--r--storage/xtradb/buf/buf0buf.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc
index 44ad78b1f9a..b03aafb6fc7 100644
--- a/storage/xtradb/buf/buf0buf.cc
+++ b/storage/xtradb/buf/buf0buf.cc
@@ -2,7 +2,7 @@
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2008, Google Inc.
-Copyright (c) 2013, 2018, MariaDB Corporation.
+Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
@@ -924,7 +924,10 @@ buf_page_is_corrupted(
/* Check whether the checksum fields have correct values */
- if (srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_NONE) {
+ const srv_checksum_algorithm_t curr_algo =
+ static_cast<srv_checksum_algorithm_t>(srv_checksum_algorithm);
+
+ if (curr_algo == SRV_CHECKSUM_ALGORITHM_NONE) {
return(false);
}
@@ -956,9 +959,6 @@ buf_page_is_corrupted(
return(false);
}
- const srv_checksum_algorithm_t curr_algo =
- static_cast<srv_checksum_algorithm_t>(srv_checksum_algorithm);
-
switch (curr_algo) {
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
return !buf_page_is_checksum_valid_crc32(
@@ -987,9 +987,7 @@ buf_page_is_corrupted(
for writing checksums because we assume that the
chance of it matching is higher. */
- if (srv_checksum_algorithm
- == SRV_CHECKSUM_ALGORITHM_CRC32) {
-
+ if (curr_algo == SRV_CHECKSUM_ALGORITHM_CRC32) {
crc32 = buf_calc_page_crc32(read_buf);
crc32_inited = true;
@@ -999,7 +997,7 @@ buf_page_is_corrupted(
return true;
}
} else {
- ut_ad(srv_checksum_algorithm
+ ut_ad(curr_algo
== SRV_CHECKSUM_ALGORITHM_INNODB);
if (checksum_field2
@@ -1028,8 +1026,7 @@ buf_page_is_corrupted(
for writing checksums because we assume that the
chance of it matching is higher. */
- if (srv_checksum_algorithm
- == SRV_CHECKSUM_ALGORITHM_CRC32) {
+ if (curr_algo == SRV_CHECKSUM_ALGORITHM_CRC32) {
if (!crc32_inited) {
crc32 = buf_calc_page_crc32(read_buf);
@@ -1042,7 +1039,7 @@ buf_page_is_corrupted(
return true;
}
} else {
- ut_ad(srv_checksum_algorithm
+ ut_ad(curr_algo
== SRV_CHECKSUM_ALGORITHM_INNODB);
if (checksum_field1