diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-20 12:51:57 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-20 12:51:57 +0200 |
commit | 042f763268c0f209e7c12e0a6a72bb5d204dfe29 (patch) | |
tree | 7ee15ab50af97cab4135f3712f95ac12fafc74c5 /mysql-test/r/having.result | |
parent | cb121a047b55403fe271570c928fd95ed64a1c8f (diff) | |
parent | 924db8b4ed3f268cbe91a1734611f4dc2311c7be (diff) | |
download | mariadb-git-042f763268c0f209e7c12e0a6a72bb5d204dfe29.tar.gz |
Merge remote-tracking branch '5.5' into 10.0
Diffstat (limited to 'mysql-test/r/having.result')
-rw-r--r-- | mysql-test/r/having.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index eda67460205..0b933427303 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -698,6 +698,21 @@ id column_1 expected -- 1 row(s) returned not ER_BAD_FIELD_ERROR drop table t1; # +# mdev-14368: grouping query with alias for aggregate function in HAVING +# when sql_mode = 'ONLY_FULL_GROUP_BY' +set @save_sql_mode= @@sql_mode; +set sql_mode = 'ONLY_FULL_GROUP_BY'; +create table t1(a int); +insert t1 values (4),(1),(2),(1), (3),(4); +SELECT a, COUNT(a) as ct FROM t1 GROUP BY a HAVING ct>0; +a ct +1 2 +2 1 +3 1 +4 2 +set sql_mode=@save_sql_mode; +drop table t1; +# # Bug mdev-5160: two-way join with HAVING over the second table # CREATE TABLE t1 (c1 varchar(6)) ENGINE=MyISAM; |