[MDEV-3686] LP:825095 - Wrong result with materialization and NOT IN with 2 expressions Created: 2011-08-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: | Critical |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT * does not return any rows when executed with materialization, even though it should return a | b explain:
minimal optimizer switch: in_to_exists=off,materialization=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=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=off,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 test case: CREATE TABLE t1 (a int,b int); CREATE TABLE t2 (b int, a int); SET SESSION optimizer_switch='in_to_exists=off,materialization=on'; SELECT * Repeatable in maria-5.3. Not repeatable in maria-5.2, mysql-5.5 . Does not involve NULLs, empty tables, empty subqueries or constant tables. Seems the particular values in the tables are significant. |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-08-17 ] |
|
Re: Wrong result with materialization and NOT IN with 2 expressions Philip, please let me know if I missed something. |
| Comment by Philip Stoev (Inactive) [ 2011-08-18 ] |
|
Re: Wrong result with materialization and NOT IN with 2 expressions DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t1; SET SESSION 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=on,in_to_exists=off,semijoin=off,partial_match_rowid_merge=on,partial_match_table_scan=off,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'; bzr version-info |
| Comment by Timour Katchaounov (Inactive) [ 2011-08-19 ] |
|
Re: Wrong result with materialization and NOT IN with 2 expressions SET @optimizer_switch='in_to_exists=off,materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=off'; |
| Comment by Rasmus Johansson (Inactive) [ 2011-08-23 ] |
|
Launchpad bug id: 825095 |