Bug #119653 Reduce unnecessary if checks in core logic
Submitted: 9 Jan 9:39
Reporter: alex xing (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S5 (Performance)
Version:8.0.44 OS:Any
Assigned to: CPU Architecture:Any

[9 Jan 9:39] alex xing
Description:
  In row_ins_scan_sec_index_for_duplicate():
  When is_next is true, is_supremum must be false based on the algorithm logic.
  This invariant allows us to eliminate unnecessary conditional checks.
 

How to repeat:
just read the code

Suggested fix:
 eliminate unnecessary conditional checks
[9 Jan 9:39] alex xing
a simple patch to describe the optimization

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: row_ins_scan_sec_index_for_duplicate_optimize.patch (application/octet-stream, text), 895 bytes.