diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-20 13:30:05 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2017-12-20 13:30:05 +0200 |
commit | e3d89652e5fd314f03875a3d026490452b2a5986 (patch) | |
tree | 9f4d60e4431933ba6e53feb3372c9297c8b8836c /mysql-test/t/having.test | |
parent | 7bbc6c14d1e8fcf1f4737e0a5fcf6237fe18bd23 (diff) | |
parent | 042f763268c0f209e7c12e0a6a72bb5d204dfe29 (diff) | |
download | mariadb-git-e3d89652e5fd314f03875a3d026490452b2a5986.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'mysql-test/t/having.test')
-rw-r--r-- | mysql-test/t/having.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test index f826feff5c0..1bbde3e7c5e 100644 --- a/mysql-test/t/having.test +++ b/mysql-test/t/having.test @@ -729,6 +729,23 @@ HAVING UPPER(`column_1`) LIKE '8%'; drop table t1; --echo # +--echo # mdev-14368: grouping query with alias for aggregate function in HAVING +--echo # 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; + +set sql_mode=@save_sql_mode; + +drop table t1; + +--echo # --echo # Bug mdev-5160: two-way join with HAVING over the second table --echo # |