[MDEV-3488] LP:809206 - Wrong result with DISTINCT + multipart keys after WL#106 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 |
|
Not repeatable before WL#106. Not repeatable with mysql-5.5 . Not repeatable without views. Not influenced by any optimizer switches. Even after the fix for 806097 the following query: SELECT DISTINCT t1.b FROM t2 JOIN ( t1 JOIN t3 ON t3.a = t1.d) ; does not return all rows if executed with a derived table or a view. 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=on,derived_with_keys=on,firstmatch=off,loosescan=off,materialization=on,in_to_exists=on,semijoin=off,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: CREATE TABLE t1 ( b int , c int, d int , KEY (d,c) ) ; CREATE TABLE t2 ( a int) ; CREATE TABLE t3 ( a varchar(32)) ; SELECT * FROM ( SELECT DISTINCT t1.b FROM t2 JOIN ( t1 JOIN t3 ON t3.a = t1.d) ) AS a1; |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-07-13 ] |
|
Re: Wrong result with DISTINCT + multipart keys after WL#106 CREATE TABLE t1 (a int) ; DROP TABLE IF EXISTS t2; SET SESSION join_cache_level=0; SELECT DISTINCT t2.a FROM t1 , t2; |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 809206 |