[MDEV-3109] LP:809179 - Wrong result with derived_merge=on + right join Created: 2011-07-12 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 |
|
Even after the fix for 806504, the following query returns no rows even though there is a row that matches the WHERE predicate. Not repeatable with derived_merge=off. Not repeatable without a derived table. Not repeatable in mysql-5.5. Not repeatable by rotating the join to a LEFT JOIN. Not repeatable with maria-5.3 before WL#106 . explain:
minimal optimizer_switch - derived_merge=on full 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=on,derived_with_keys=on,firstmatch=off,loosescan=off,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,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=on,table_elimination=on bzr version-info: revision-id: <email address hidden> test case: DROP DATABASE IF NOT EXISTS bug; DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t2; SELECT alias2.a, alias2.b FROM t1 RIGHT JOIN ( ( SELECT * FROM t1 ) AS alias2 , t2) ON t2.f4 != 0 WHERE ( alias2.a , alias2.b ) NOT IN ( SELECT 7 , 5 ); |
| Comments |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 809179 |