[MDEV-19871] Add page id matching check in innochecksum tool Created: 2019-06-26  Updated: 2022-11-03  Resolved: 2019-06-28

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2
Fix Version/s: 10.2.26, 10.3.17, 10.4.7, 10.5.0

Type: Bug Priority: Major
Reporter: Thirunarayanan Balathandayuthapani Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-29938 InnoDB: Assertion failure in btr0pcur... Open
relates to MDEV-21109 Table corruption not detected with CH... Closed

 Description   

Add the condition in InnoChecksum tool to check whether page number stored in the disk
matches with in-memory page number we count during tablespace read. This could
catch the write corruption caused by InnoDB.



 Comments   
Comment by Marko Mäkelä [ 2019-06-27 ]

I believe that is_page_corrupted() in innochecksum() should be refined and tested a little more:

  1. It should check that all tablespace ID on the nonzero pages of a data file are the same.
  2. Test with a multi-file system tablespace. Other than the first files could start with all-zero pages, so we would seem to need the following kind of logic:
  • Read the tablespace ID and page number from the first not-all-zero page. (We may have to assume innodb_page_size=16k in this case.)
  • For subsequent not-all-zero pages, the tablespace ID must match, and the page number must be consistent.

OK to push after these changes.

Generated at Thu Feb 08 08:55:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.