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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.047 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.