# File lib/innodb/page.rb, line 334 def checksum_innodb unless size == 16384 raise "Checksum calculation is only supported for 16 KiB pages" end @checksum_innodb ||= begin # Calculate the InnoDB checksum of the page header. c_partial_header = Innodb::Checksum.fold_enumerator(each_page_header_byte_as_uint8) # Calculate the InnoDB checksum of the page body. c_page_body = Innodb::Checksum.fold_enumerator(each_page_body_byte_as_uint8) # Add the two checksums together, and mask the result back to 32 bits. (c_partial_header + c_page_body) & Innodb::Checksum::MAX end end