[MDEV-21918] improve page_zip_verify_checksum() Created: 2020-03-11  Updated: 2020-03-21  Resolved: 2020-03-12

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.1.45, 10.2.32, 10.3.23, 10.4.13, 10.5.2

Type: Task Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-12026 Support encrypted SPATIAL INDEX Closed

 Description   

1. Generally, we accept all-zeroes page checksums because of this code: https://github.com/MariaDB/server/blob/b30446c85dbf0fd402a7833e1042bc13be7fece2/storage/innobase/page/page0zip.cc#L4877 So, lets state it in the code
2. All-zeroes pages are correct for page_zip_verify_checksum()
3. reinterpret_cast<uint64_t*> from char* is incorrect (UB). It needs to be fixed.

Note that since 10.4.3 https://jira.mariadb.org/browse/MDEV-12026 InnoDB can compute CRC32 checksum without bitwise XOR. And such checksum can be 0 only when all input is zeroes.


Generated at Thu Feb 08 09:10:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.