summaryrefslogtreecommitdiff
path: root/mysql-test/r/having.result
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-01-01 19:39:59 +0200
committerMonty <monty@mariadb.org>2018-01-01 19:39:59 +0200
commitfbab79c9b8a58b90292e900cf46ab6d6632ebb68 (patch)
tree49738ad2561489954fa0973d82be10fafbf42e0b /mysql-test/r/having.result
parentafbb72b3b6988f4c5242d46588754517724b2950 (diff)
parentaed2050e40cb332d54e8d40eb7242309b962c4e1 (diff)
downloadmariadb-git-fbab79c9b8a58b90292e900cf46ab6d6632ebb68.tar.gz
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts: cmake/make_dist.cmake.in mysql-test/r/func_json.result mysql-test/r/ps.result mysql-test/t/func_json.test mysql-test/t/ps.test sql/item_cmpfunc.h
Diffstat (limited to 'mysql-test/r/having.result')
-rw-r--r--mysql-test/r/having.result15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index 8a8d6e7b2aa..fe36ef9d442 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -696,6 +696,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;