[MDEV-2956] LP:791761 - HAVING not observed with subquery in maria-5.3 Created: 2011-06-02 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: | Minor |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Igor Babaev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Not repeatable on maria-5.2, mysql-5.5. HAVING is not observed in the query below, so the result set contains 1 row that does not match the having. Explain:
test case: CREATE TABLE t1 ( f2 int, f3 int , KEY (f3) ) ; CREATE TABLE t2 ( f1 int NOT NULL ) ; CREATE TABLE t3 ( f3 int) ; SELECT MAX( t1.f3 ) AS field1 should return an empty result, but instead returns NULL bzr version-info: revision-id: <email address hidden> |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-06-14 ] | ||
|
Re: HAVING not observed with subquery in maria-5.3 SELECT MAX( t1.f3 ) AS field1
--------
-------- | ||
| Comment by Philip Stoev (Inactive) [ 2011-06-29 ] | ||
|
Re: HAVING not observed with subquery in maria-5.3 total 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=on,derived_merge=on,derived_with_keys=on,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=on,mrr_cost_based=off,mrr_sort_keys=on,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 minimal optimizer switch: semijoin=off explain: id select_type table type possible_keys key key_len ref rows Extra test case: SET SESSION optimizer_switch='semijoin=off'; CREATE TABLE t1 ( f1 int ); CREATE TABLE t2 ( f1 int , KEY (f1)) ; SELECT MAX( alias1.f1 ) AS field1 | ||
| Comment by Timour Katchaounov (Inactive) [ 2011-07-07 ] | ||
|
Re: HAVING not observed with subquery in maria-5.3 | ||
| Comment by Oleksandr Byelkin [ 2012-02-25 ] | ||
|
Re: HAVING not observed with subquery in maria-5.3 | ||
| Comment by Rasmus Johansson (Inactive) [ 2012-02-25 ] | ||
|
Launchpad bug id: 791761 |