Bug #117791 | FORCE INDEX does not skip records_in_range() for 'x IS NULL' | ||
---|---|---|---|
Submitted: | 25 Mar 13:30 | Modified: | 25 Mar 13:47 |
Reporter: | Kaiwang CHen (OCA) | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0, 8.4, 9.2 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution |
[25 Mar 13:30]
Kaiwang CHen
[25 Mar 13:33]
Kaiwang CHen
Add more checks in the range iterator so that SKIP_RECORDS_IN_RANGE itself precisely decides the alternative estimation. (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: bug_117791.patch (application/octet-stream, text), 5.62 KiB.
[25 Mar 13:46]
Kaiwang CHen
The second path adds null test for index statistics inside the alternative estimation branch, which makes force index nicer. (*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: bug_117791_2.patch (application/octet-stream, text), 616 bytes.
[25 Mar 13:47]
MySQL Verification Team
Hello Kaiwang, Thank you for the report and contribution. regards, Umesh