[MDEV-2356] LP:879882 - Wrong result with derived_merge=ON, derived table, RIGHT JOIN Created: 2011-10-22 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT alias2.b, alias2.c, t1.a returns no rows with derived_merge=ON (impossible where, even though the WHERE clause is true) and 1 row with derived_merge=ON (which is the correct result: EXPLAIN with derived_merge=ON:
EXPLAIN with derived_merge=off:
select 8 AS `b`,'c' AS `c`,'c' AS `a` from `test`.`t1` join (select 29 AS `a`,8 AS `b`,'c' AS `c` from `test`.`t3` left join `test`.`t2` on(0)) `alias2` where (8) minimal optimizer switch: derived_merge=on test case: DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t3; SELECT alias2.b, alias2.c, t1.a This particular test case contains a degenerate WHERE condition, however the bug was also observed with a WHERE condition containing x IN (SELECT y), so I think it is a valid bug. bzr version-info: revision-id: <email address hidden> |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 879882 |