1
1
/*****************************************************************************
3
Copyright (c) 1994, 2013, Oracle and/or its affiliates. All Rights Reserved.
3
Copyright (c) 1994, 2015, Oracle and/or its affiliates. All Rights Reserved.
4
4
Copyright (c) 2012, Facebook Inc.
6
6
This program is free software; you can redistribute it and/or modify it under
2812
2812
return(prev_rec);
2815
/** Issue a warning when the checksum that is stored in the page is valid,
2816
but different than the global setting innodb_checksum_algorithm.
2817
@param[in] current_algo current checksum algorithm
2818
@param[in] page_checksum page valid checksum
2819
@param[in] space_id tablespace id
2820
@param[in] page_no page number */
2822
page_warn_strict_checksum(
2823
srv_checksum_algorithm_t curr_algo,
2824
srv_checksum_algorithm_t page_checksum,
2828
srv_checksum_algorithm_t curr_algo_nonstrict;
2829
switch (curr_algo) {
2830
case SRV_CHECKSUM_ALGORITHM_STRICT_CRC32:
2831
curr_algo_nonstrict = SRV_CHECKSUM_ALGORITHM_CRC32;
2833
case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
2834
curr_algo_nonstrict = SRV_CHECKSUM_ALGORITHM_INNODB;
2836
case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
2837
curr_algo_nonstrict = SRV_CHECKSUM_ALGORITHM_NONE;
2843
ib_logf(IB_LOG_LEVEL_WARN,
2844
"innodb_checksum_algorithm is set to \"%s\""
2845
" but the page [page id: space=" ULINTPF ","
2846
" page number=" ULINTPF "] contains a valid checksum \"%s\"."
2847
" Accepting the page as valid. Change innodb_checksum_algorithm"
2848
" to \"%s\" to silently accept such pages or rewrite all pages"
2849
" so that they contain \"%s\" checksum.",
2850
buf_checksum_algorithm_name(curr_algo),
2852
buf_checksum_algorithm_name(page_checksum),
2853
buf_checksum_algorithm_name(curr_algo_nonstrict),
2854
buf_checksum_algorithm_name(curr_algo_nonstrict));