Bug #115924 The parallel check table does not compare all primary key records
Submitted: 25 Aug 4:13 Modified: 26 Aug 9:04
Reporter: Ke Yu (OCA) Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.37 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[25 Aug 4:13] Ke Yu
Description:
Parallel check table divides the btree into multiple subtrees and compares the records of each subtree to ensure that the records are in order, but the rightmost record in the subtree is not compared with the next record.

How to repeat:
We can find this problem from the 8.0.37 code.

In function parallel_check_table(), we set up the callback function with reader.add_scan(), and the callback function is called to compare the record every time a record is scanned. This is used to compare the record inside the subtree. The record on the rightmost of the subtree is not compared to the next record.

Suggested fix:
The rightmost record in the subtree should be compared with the next record.
[26 Aug 9:36] Rahul Sisondia
Hello Ke Yu, 

Thank you for the bug report. 

Could you please let us know if you noticed the observed behaviour since 8.0.37 or even with prior releases as well ?

Do you happen to have a scenario that could demonstrate the behaviour ?