Bug #101665 | mysql use incorrect index during executing "select" query | ||
---|---|---|---|
Submitted: | 18 Nov 2020 17:58 | Modified: | 19 Nov 2020 13:06 |
Reporter: | Daniil Kamenskiy | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0.22 | OS: | Linux |
Assigned to: | CPU Architecture: | x86 |
[18 Nov 2020 17:58]
Daniil Kamenskiy
[19 Nov 2020 13:06]
MySQL Verification Team
Hi Mr. Kamenskiy, Thank you for your bug report. I have managed to repeat your test case and I have got the same results. I even used a totally different of values for the column `d`, which is better. This is just a small bug in the display of the EXPLAIN statement in cases like the one presented here. Regarding locking, this query is scanning the entire index, which is why all rows are locked, when the FOR UPDATE statement is used. Verified as reported.