Commit ed13a0d2 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-12112: Support WITH_INNODB_BUG_ENDIAN_CRC32

fil_space_verify_crypt_checksum(): Compute the bug-compatible variant
of the CRC-32C checksum if the correct one does not match.
parent fae7e350
......@@ -2563,7 +2563,11 @@ fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
SRV_CHECKSUM_ALGORITHM_CRC32);
}
return checksum == buf_calc_page_crc32(page);
return checksum == buf_calc_page_crc32(page)
#ifdef INNODB_BUG_ENDIAN_CRC32
|| checksum == buf_calc_page_crc32(page, true)
#endif
;
case SRV_CHECKSUM_ALGORITHM_STRICT_INNODB:
if (page_size.is_compressed()) {
return checksum == page_zip_calc_checksum(
......@@ -2594,6 +2598,9 @@ fil_space_verify_crypt_checksum(const byte* page, const page_size_t& page_size)
}
return checksum == buf_calc_page_crc32(page)
#ifdef INNODB_BUG_ENDIAN_CRC32
|| checksum == buf_calc_page_crc32(page, true)
#endif
|| checksum == buf_calc_page_new_checksum(page);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment