![]()  | 
  
    MySQL 9.5.0
    
   Source Code Documentation 
   | 
 
Class to print checksums to log file. More...
#include <buf0checksum.h>
Public Member Functions | |
| BlockReporter (bool check_lsn, const byte *read_buf, const page_size_t &page_size, bool skip_checksum) | |
| Constructor.  More... | |
| virtual | ~BlockReporter ()=default | 
| BlockReporter (const BlockReporter &)=default | |
| bool | is_corrupted () const | 
| Checks if a page is corrupt.  More... | |
| bool | is_encrypted () const noexcept | 
| Checks if a page is encrypted.  More... | |
| virtual void | report_empty_page (bool empty) const | 
| Print message if page is empty.  More... | |
| virtual void | print_strict_crc32 (uint32_t checksum_field1, uint32_t checksum_field2, uint32_t crc32, srv_checksum_algorithm_t algo) const | 
| Print crc32 checksum and the checksum fields in page.  More... | |
| virtual void | print_strict_innodb (uint32_t checksum_field1, uint32_t checksum_field2) const | 
| Print innodb checksum and the checksum fields in page.  More... | |
| virtual void | print_strict_none (uint32_t checksum_field1, uint32_t checksum_field2, srv_checksum_algorithm_t algo) const | 
| Print none checksum and the checksum fields in page.  More... | |
| virtual void | print_innodb_checksum (uint32_t old_checksum, uint32_t new_checksum, uint32_t checksum_field1, uint32_t checksum_field2, srv_checksum_algorithm_t algo) const | 
| Print innodb checksum value stored in page trailer.  More... | |
| virtual void | print_innodb_fail () const | 
| Print the message that checksum mismatch happened in page header.  More... | |
| virtual void | print_crc32_checksum (uint32_t checksum_field1, uint32_t checksum_field2) const | 
| Print both new-style, old-style & crc32 checksum values.  More... | |
| virtual void | print_crc32_fail () const | 
| Print a message that crc32 check failed.  More... | |
| virtual void | print_none_fail () const | 
| Print a message that none check failed.  More... | |
| virtual void | print_compressed_checksum (uint32_t calc, uint32_t stored) const | 
| Print checksum values on a compressed page.  More... | |
| bool | verify_zip_checksum () const | 
| Verify a compressed page's checksum.  More... | |
| uint32_t | calc_zip_checksum (const byte *read_buf, ulint phys_page_size, srv_checksum_algorithm_t algo) const | 
| Calculate the compressed page checksum.  More... | |
| uint32_t | calc_zip_checksum (srv_checksum_algorithm_t algo) const | 
| Calculate the compressed page checksum.  More... | |
Static Public Member Functions | |
| static bool | is_lsn_valid (const byte *frame, uint32_t page_size) noexcept | 
Protected Attributes | |
| bool | m_check_lsn | 
| If true, do a LSN check during innodb recovery.  More... | |
| const byte * | m_read_buf | 
| Buffer holding the page.  More... | |
| const page_size_t & | m_page_size | 
| Page size.  More... | |
| bool | m_skip_checksum | 
| Skip checksum verification but compare only data.  More... | |
Private Member Functions | |
| bool | is_checksum_valid_innodb (uint32_t checksum_field1, uint32_t checksum_field2, const srv_checksum_algorithm_t algo) const | 
| Checks if the page is in innodb checksum format.  More... | |
| bool | is_checksum_valid_none (uint32_t checksum_field1, uint32_t checksum_field2, const srv_checksum_algorithm_t algo) const | 
| Checks if the page is in none checksum format.  More... | |
| bool | is_checksum_valid_crc32 (uint32_t checksum_field1, uint32_t checksum_field2, const srv_checksum_algorithm_t algo, bool use_legacy_big_endian) const | 
| Checks if the page is in crc32 checksum format.  More... | |
| void | page_warn_strict_checksum (srv_checksum_algorithm_t curr_algo, srv_checksum_algorithm_t page_checksum, const page_id_t &page_id) const | 
| Issue a warning when the checksum that is stored in the page is valid, but different than the global setting innodb_checksum_algorithm.  More... | |
| space_id_t | space_id () const noexcept | 
| page_no_t | page_no () const noexcept | 
Class to print checksums to log file.
      
  | 
  inline | 
Constructor.
| [in] | check_lsn | check lsn of the page with the current lsn (only in recovery) | 
| [in] | read_buf | buffer holding the page | 
| [in] | page_size | page size | 
| [in] | skip_checksum | skip checksum verification | 
      
  | 
  virtualdefault | 
      
  | 
  default | 
| uint32_t BlockReporter::calc_zip_checksum | ( | const byte * | read_buf, | 
| ulint | phys_page_size, | ||
| srv_checksum_algorithm_t | algo | ||
| ) | const | 
Calculate the compressed page checksum.
This variant should be used when only the page_size_t is unknown and only physical page_size of compressed page is available.
| [in] | read_buf | buffer holding the page | 
| [in] | phys_page_size | physical page size | 
| [in] | algo | checksum algorithm to use | 
| uint32_t BlockReporter::calc_zip_checksum | ( | srv_checksum_algorithm_t | algo | ) | const | 
Calculate the compressed page checksum.
| [in] | algo | checksum algorithm to use | 
      
  | 
  private | 
Checks if the page is in crc32 checksum format.
| [in] | checksum_field1 | new checksum field | 
| [in] | checksum_field2 | old checksum field | 
| [in] | algo | current checksum algorithm | 
| [in] | use_legacy_big_endian | big endian algorithm | 
      
  | 
  private | 
Checks if the page is in innodb checksum format.
| [in] | checksum_field1 | new checksum field | 
| [in] | checksum_field2 | old checksum field | 
| [in] | algo | current checksum algorithm | 
      
  | 
  private | 
Checks if the page is in none checksum format.
| [in] | checksum_field1 | new checksum field | 
| [in] | checksum_field2 | old checksum field | 
| [in] | algo | current checksum algorithm | 
| bool BlockReporter::is_corrupted | ( | ) | const | 
Checks if a page is corrupt.
| true | if page is corrupt | 
| false | if page is not corrupt | 
      
  | 
  noexcept | 
Checks if a page is encrypted.
| true | if page is encrypted | 
| false | if page is not encrypted | 
      
  | 
  staticnoexcept | 
      
  | 
  privatenoexcept | 
      
  | 
  private | 
Issue a warning when the checksum that is stored in the page is valid, but different than the global setting innodb_checksum_algorithm.
| [in] | curr_algo | current checksum algorithm | 
| [in] | page_checksum | page valid checksum | 
| [in] | page_id | page identifier | 
      
  | 
  inlinevirtual | 
Print checksum values on a compressed page.
| [in] | calc | the calculated checksum value | 
| [in] | stored | the stored checksum in header. | 
      
  | 
  inlinevirtual | 
Print both new-style, old-style & crc32 checksum values.
| [in] | checksum_field1 | Checksum in page header | 
| [in] | checksum_field2 | Checksum in page trailer | 
      
  | 
  inlinevirtual | 
Print a message that crc32 check failed.
      
  | 
  inlinevirtual | 
Print innodb checksum value stored in page trailer.
| [in] | old_checksum | checksum value according to old style | 
| [in] | new_checksum | checksum value according to new style | 
| [in] | checksum_field1 | Checksum in page header | 
| [in] | checksum_field2 | Checksum in page trailer | 
| [in] | algo | current checksum algorithm | 
      
  | 
  inlinevirtual | 
Print the message that checksum mismatch happened in page header.
      
  | 
  inlinevirtual | 
Print a message that none check failed.
      
  | 
  inlinevirtual | 
Print crc32 checksum and the checksum fields in page.
| [in] | checksum_field1 | Checksum in page header | 
| [in] | checksum_field2 | Checksum in page trailer | 
| [in] | crc32 | Calculated crc32 checksum | 
| [in] | algo | Current checksum algorithm | 
      
  | 
  inlinevirtual | 
Print innodb checksum and the checksum fields in page.
| [in] | checksum_field1 | Checksum in page header | 
| [in] | checksum_field2 | Checksum in page trailer | 
      
  | 
  inlinevirtual | 
Print none checksum and the checksum fields in page.
| [in] | checksum_field1 | Checksum in page header | 
| [in] | checksum_field2 | Checksum in page trailer | 
| [in] | algo | Current checksum algorithm | 
      
  | 
  inlinevirtual | 
Print message if page is empty.
| [in] | empty | true if page is empty | 
      
  | 
  privatenoexcept | 
| bool BlockReporter::verify_zip_checksum | ( | ) | const | 
Verify a compressed page's checksum.
| true | if stored checksum is valid according to the value of srv_checksum_algorithm | 
| false | if stored checksum is not valid according to the value of srv_checksum_algorithm | 
      
  | 
  protected | 
If true, do a LSN check during innodb recovery.
      
  | 
  protected | 
Page size.
      
  | 
  protected | 
Buffer holding the page.
      
  | 
  protected | 
Skip checksum verification but compare only data.