Bug #113177 | unexcepted explain when using invisiable index | ||
---|---|---|---|
Submitted: | 22 Nov 2023 7:36 | Modified: | 24 Nov 2023 16:21 |
Reporter: | ding qi | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[22 Nov 2023 7:36]
ding qi
[22 Nov 2023 12:50]
MySQL Verification Team
Hi Mr. bryce, Thanks a lot for your bug report. However, it is not a bug. If you look at the tables for data locks and data lock waits, you will notice that not a single InnoDB lock is set, nor is anything waiting for the InnoDB locks. This is all only about table metadata locks. The explain shows result with the index being visible, because it executes before table cache is updated, after the ALTER table. This is all explained in our Reference Manual. Not a bug.
[24 Nov 2023 16:21]
ding qi
The result of the third query will be different ,if I change the engine of tb1 to MyISAM (will be affected by the alter statement) Is this by designed too?
[27 Nov 2023 10:36]
MySQL Verification Team
Yes, definitely. That is because MyISAM uses only table locks. No index locks, record locks. Nothing but the table locks.