Bug #23172 | Optimizer cant parse correlated subquery using derived table | ||
---|---|---|---|
Submitted: | 11 Oct 2006 11:50 | Modified: | 12 Oct 2006 12:19 |
Reporter: | Dmitry L | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.27-BK, 5.x | OS: | Linux (Linux, win32) |
Assigned to: | CPU Architecture: | Any |
[11 Oct 2006 11:50]
Dmitry L
[11 Oct 2006 12:53]
Martin Friebe
I believe this is the similiar or the same as Bug #8019
[11 Oct 2006 12:57]
Valeriy Kravchuk
Thank you for a problem report. Verified just as described (with minor corrections like insert into obj values(1),(2);) with 5.0.27-BK on Linux: mysql> select -> (select sum(cnt) -> from (select cnt -> from obj_stat -> where id = obj.id -> and dtime < 4 -> union all -> select count(*) -> from obj_stat_today -> where id = obj.id) x) as cnt -> from obj; ERROR 1054 (42S22): Unknown column 'obj.id' in 'where clause' Not sdure is it really a bug (looks like a feature request for me), but let the developers decide.
[11 Oct 2006 15:40]
Dmitry L
Thank you, Valeriy Seems like #8019 is similar to this one, sorry about dup Anyway I think this should be fixed, because other databases (Oracle, MSSql) execute such query
[12 Oct 2006 12:19]
Valeriy Kravchuk
Duplicate of bug #8019.