Bug #18925 | Dependant, subquery on information_schema.COLUMNS returns wrong result | ||
---|---|---|---|
Submitted: | 9 Apr 2006 19:21 | Modified: | 7 Aug 2006 8:00 |
Reporter: | Roland Bouman | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 5.0.21-BK, 5.0.18, 5.1.7 | OS: | Linux (Linux, win xp pro) |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
[9 Apr 2006 19:21]
Roland Bouman
[10 Apr 2006 14:17]
Valeriy Kravchuk
Verified just as described on 5.0.21-BK (ChangeSet@1.2143, 2006-04-10 08:29:24+02:00) on Linux.
[21 Jul 2006 23:30]
Igor Babaev
This bug manifests itself on a very simple query: mysql> select version(); +--------------+ | version() | +--------------+ | 5.0.23-debug | +--------------+ 1 row in set (0.00 sec) mysql> select table_name from information_schema.tables -> where table_name=(select max(table_name) -> from information_schema.tables); Empty set (0.01 sec)
[22 Jul 2006 17:29]
Igor Babaev
It has turned out that wrong results in the reported query and the sumple query I brought up in my previous comment are caused by different problems in the code. More exactly the fix for my simple query does not fix the reported query and vice versa. That's why I report the problem with my simple query as a separate bug #21231: "A wrong result for a simple query with a subquery on information schema".
[22 Jul 2006 19:43]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/9454
[24 Jul 2006 5:40]
Sergei Glukhov
ok to push
[2 Aug 2006 18:56]
Evgeny Potemkin
Execution of some correlated subqueries may set the value of null_row to 1 for tables used in the subquery. If the the subquery is on information schema it causes rejection of any row for the following executions of the subquery in the case when an optimization filtering by some condition is applied. Fixed in 5.0.25, 5.1.12
[7 Aug 2006 8:00]
Jon Stephens
Documented bugfix in 5.0.25 and 5.1.12 changelogs.
[27 Jun 2008 15:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/48656 2657 Konstantin Osipov 2008-06-27 Move the part of information_schema.test that takes 90% of the time to information_schema-big.test. This test case accounted for information_schema.test timeout on powermacg5, which has a very slow file system.