Bug #100453 | Drop TABLESPACE of a table has inconsistent impact on the query | ||
---|---|---|---|
Submitted: | 7 Aug 2020 12:14 | Modified: | 7 Aug 2020 15:52 |
Reporter: | Yushan ZHANG | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
Version: | 5.7.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | ALTER TABLE, innodb, Tablespace |
[7 Aug 2020 12:14]
Yushan ZHANG
[7 Aug 2020 15:52]
MySQL Verification Team
Hi Mr. ZHANG, Thank you for your bug report. I have changed your test case so that the error throwing statement is removed. With latest 8.0, I get the following: col_smallint_signed 1 With latest 5.7, I get the following: col_smallint_signed 1 Hence, your test case is repeated. Verified as reported.
[12 Aug 2020 15:12]
Justin Swanhart
Just a note: The MySQL optimizer notes impossible where clauses, and does not try to read from the table when an impossible where clause is detected. Because MySQL does not try to read from the table, it does not detect that the table has no tablespace. If MySQL were not to do this, it would read all rows from the table and discard them all, which would not be optimal, so I do not think this is a bug.
[12 Aug 2020 15:14]
Justin Swanhart
The InnoDB storage engine does not evaluate conditions, except in the case of ICP, and thus it would not be possible to abandon the scan if this optimization were to be removed.
[13 Aug 2020 12:24]
MySQL Verification Team
Justin, True, but it is still a bug and a very low priority one ......