[MDEV-3565] LP:813473 - Wrong result with outer join + NOT IN subquery Created: 2011-07-20 Updated: 2012-10-04 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Repeatable in maria-5.3, maria-5.2, maria-5.1, mysql-5.5 . Not repeatable in mysql-5.1. Not influenced by optimizer switches. The following query: SELECT t2.b , t1.c does not return rows for which the WHERE predicate is true. It returns an empty result in maria and mysql-5.5 and in mysql-5.1 it returns: b c test case: CREATE TABLE t1 (c int) ; CREATE TABLE t2 (a int, b int) ; SELECT t2.b , t1.c explain:
optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on revision-id: <email address hidden> test case: DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; SELECT t2.b , t1.c |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-07-21 ] |
|
Re: Wrong result with outer join + NOT IN subquery |
| Comment by Timour Katchaounov (Inactive) [ 2011-07-21 ] |
|
Re: Wrong result with outer join + NOT IN subquery CREATE TABLE t1 (c int) ; CREATE TABLE t2 (a int, b int) ; create table t3 (d int, e int); EXPLAIN SELECT t2.b , t1.c |
| Comment by Timour Katchaounov (Inactive) [ 2011-08-17 ] |
|
Re: Wrong result with outer join + NOT IN subquery |
| Comment by Rasmus Johansson (Inactive) [ 2011-08-17 ] |
|
Launchpad bug id: 813473 |