Commit b4d102e8 authored by Jan Lindström's avatar Jan Lindström

MDEV-17810: Improve error printout when decryption fails or we identify page...

MDEV-17810: Improve error printout when decryption fails or we identify page as both encrypted and unencrypted

fil_space_verify_crypt_checksum
	Print out both stored checksum and calculated checksums
	for encrypted page and unencrypted page asumptions.
parent 33fdb443
...@@ -2569,7 +2569,7 @@ fil_space_verify_crypt_checksum( ...@@ -2569,7 +2569,7 @@ fil_space_verify_crypt_checksum(
return (true); return (true);
} }
uint32 cchecksum1, cchecksum2; uint32_t cchecksum1, cchecksum2;
/* Calculate checksums */ /* Calculate checksums */
if (page_size.is_compressed()) { if (page_size.is_compressed()) {
...@@ -2652,10 +2652,19 @@ fil_space_verify_crypt_checksum( ...@@ -2652,10 +2652,19 @@ fil_space_verify_crypt_checksum(
#else /* UNIV_INNOCHECKSUM */ #else /* UNIV_INNOCHECKSUM */
ib::error() ib::error()
<< " Page " << space << ":" << offset << " Page " << space << ":" << offset
<< " may be corrupted." << " may be corrupted.";
" Post encryption checksum " << checksum ib::info()
<< " stored [" << checksum1 << ":" << checksum2 << "If encrypted: stored checksum" << checksum
<< " calculated checksum [" << cchecksum1 << ":" << cchecksum2
<< "] key_version " << key_version; << "] key_version " << key_version;
ib::info()
<< "If unencrypted: stored checksum [" << checksum1
<< ":" << checksum2 << "] calculated crc32 ["
<< buf_calc_page_crc32(page, false) << ":"
<< buf_calc_page_crc32(page, true) << "] innodb ["
<< buf_calc_page_old_checksum(page) << ":"
<< buf_calc_page_new_checksum(page) << "] LSN "
<< mach_read_from_4(page + FIL_PAGE_LSN);
#endif #endif
encrypted = false; encrypted = false;
} }
......
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