[MDEV-3601] LP:813447 - Wrong result with outer join + subquery in ON clause in maria-5.3 Created: 2011-07-20 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 |
|
Not repeatable with maria-5.3, mysql 5.1 . Not influenced by optimizer switches. The following query: SELECT t3.b FROM t2 LEFT JOIN t3 ON ( 6 ) IN ( SELECT a FROM t1 ); returns t3.b = 0 even though the ON clause is FALSE and therefore there are no records to be joined between the two tables. explain:
actual result: mysql> SELECT t3.b FROM t2 LEFT JOIN t3 ON ( 6 ) IN ( SELECT a FROM t1 );
------
------ expected result: SELECT t3.b FROM t2 LEFT JOIN t3 ON ( 6 ) IN ( SELECT a FROM t1 );
------
------ test case: DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t3; SELECT t3.b FROM t2 LEFT JOIN t3 ON ( 6 ) IN ( SELECT a FROM t1 ); bzr version-info revision-id: <email address hidden> optimizer switch in effect: 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 |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-07-20 ] |
|
Re: Wrong result with outer join + subquery in ON clause in maria-5.3 |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 813447 |