~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to storage/innobase/page/page0page.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-07-21 07:09:29 UTC
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20150721070929-mg4dpqkgg3it1ajf
Tags: upstream-5.6.25
ImportĀ upstreamĀ versionĀ 5.6.25

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
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.
5
5
 
6
6
This program is free software; you can redistribute it and/or modify it under
2811
2811
        }
2812
2812
        return(prev_rec);
2813
2813
}
 
2814
 
 
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 */
 
2821
void
 
2822
page_warn_strict_checksum(
 
2823
        srv_checksum_algorithm_t        curr_algo,
 
2824
        srv_checksum_algorithm_t        page_checksum,
 
2825
        ulint                           space_id,
 
2826
        ulint                           page_no)
 
2827
{
 
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;
 
2832
                break;
 
2833
        case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
 
2834
                curr_algo_nonstrict = SRV_CHECKSUM_ALGORITHM_INNODB;
 
2835
                break;
 
2836
        case SRV_CHECKSUM_ALGORITHM_STRICT_NONE:
 
2837
                curr_algo_nonstrict = SRV_CHECKSUM_ALGORITHM_NONE;
 
2838
                break;
 
2839
        default:
 
2840
                ut_error;
 
2841
        }
 
2842
 
 
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),
 
2851
                space_id, page_no,
 
2852
                buf_checksum_algorithm_name(page_checksum),
 
2853
                buf_checksum_algorithm_name(curr_algo_nonstrict),
 
2854
                buf_checksum_algorithm_name(curr_algo_nonstrict));
 
2855
}