| MySQL 5.6.14 Source Code Document
    | 
#include "univ.i"#include "fil0fil.h"#include "ut0crc32.h"#include "ut0rnd.h"#include "srv0srv.h"#include "buf0types.h"
Go to the source code of this file.
| Functions | |
| UNIV_INTERN ib_uint32_t | buf_calc_page_crc32 (const byte *page) | 
| UNIV_INTERN ulint | buf_calc_page_new_checksum (const byte *page) | 
| UNIV_INTERN ulint | buf_calc_page_old_checksum (const byte *page) | 
| UNIV_INTERN const char * | buf_checksum_algorithm_name (srv_checksum_algorithm_t algo) | 
| Variables | |
| UNIV_INTERN ulong | srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB | 
Buffer pool checksum functions, also linked from /extra/innochecksum.cc
Created Aug 11, 2011 Vasil Dimov
Definition in file buf0checksum.cc.
| UNIV_INTERN ib_uint32_t buf_calc_page_crc32 | ( | const byte * | page | ) | 
Calculates a page CRC32 which is stored to the page when it is written to a file. Note that we must be careful to calculate the same value on 32-bit and 64-bit architectures.
| page | in: buffer page | 
Definition at line 51 of file buf0checksum.cc.

| UNIV_INTERN ulint buf_calc_page_new_checksum | ( | const byte * | page | ) | 
Calculates a page checksum which is stored to the page when it is written to a file. Note that we must be careful to calculate the same value on 32-bit and 64-bit architectures.
| page | in: buffer page | 
Definition at line 81 of file buf0checksum.cc.


| UNIV_INTERN ulint buf_calc_page_old_checksum | ( | const byte * | page | ) | 
In versions < 4.0.14 and < 4.1.1 there was a bug that the checksum only looked at the first few bytes of the page. This calculates that old checksum. NOTE: we must first store the new formula checksum to FIL_PAGE_SPACE_OR_CHKSUM before calculating and storing this old checksum because this takes that field as an input!
| page | in: buffer page | 
Definition at line 115 of file buf0checksum.cc.


| UNIV_INTERN const char* buf_checksum_algorithm_name | ( | srv_checksum_algorithm_t | algo | ) | 
Return a printable string describing the checksum algorithm.
| algo | in: algorithm | 
Definition at line 135 of file buf0checksum.cc.

| UNIV_INTERN ulong srv_checksum_algorithm = SRV_CHECKSUM_ALGORITHM_INNODB | 
the macro MYSQL_SYSVAR_ENUM() requires "long unsigned int" and if we
use srv_checksum_algorithm_t here then we get a compiler error: ha_innodb.cc:12251: error: cannot convert 'srv_checksum_algorithm_t*' to 'long unsigned int*' in initialization
Definition at line 40 of file buf0checksum.cc.