summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_by.test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-29 10:38:56 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-29 10:38:56 +0200
commit5bea397f99017d0e763c535359fd4c516a333c68 (patch)
tree6a44df5398a1db055b33e2b93ad62a7e8693ceda /mysql-test/t/group_by.test
parent7dda787d602353c93962666634062e5dd112f87c (diff)
downloadmariadb-git-5bea397f99017d0e763c535359fd4c516a333c68.tar.gz
fixed functions to be able work with group function as argument
made bisone 1.75 compatible code mysql-test/r/group_by.result: test of function with agregate function inside mysql-test/t/group_by.test: test of function with agregate function inside sql/item_cmpfunc.cc: fixed functions to be able work with group function as argument sql/item_cmpfunc.h: fixed functions to be able work with group function as argument sql/item_func.cc: fixed functions to be able work with group function as argument sql/item_func.h: fixed functions to be able work with group function as argument sql/item_strfunc.cc: fixed functions to be able work with group function as argument sql/item_strfunc.h: fixed functions to be able work with group function as argument sql/sql_yacc.yy: made bisone 1.75 compatible code BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r--mysql-test/t/group_by.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index b21ae88007b..6e256d7896f 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -323,3 +323,26 @@ select a,count(*) from t1 group by a;
set option sql_big_tables=1;
select a,count(*) from t1 group by a;
drop table t1;
+
+
+#
+# group function arguments in some functions
+#
+
+create table t1 (a int, b int);
+insert into t1 values (1, 4);
+insert into t1 values (10, 40);
+insert into t1 values (1, 4);
+insert into t1 values (10, 43);
+insert into t1 values (1, 4);
+insert into t1 values (10, 41);
+insert into t1 values (1, 4);
+insert into t1 values (10, 43);
+insert into t1 values (1, 4);
+select a, MAX(b), INTERVAL (MAX(b), 1,3,10,30,39,40,50,60,100,1000) from t1 group by a;
+select a, MAX(b), CASE MAX(b) when 4 then 4 when 43 then 43 else 0 end from t1 group by a;
+select a, MAX(b), FIELD(MAX(b), '43', '4', '5') from t1 group by a;
+select a, MAX(b), CONCAT_WS(MAX(b), '43', '4', '5') from t1 group by a;
+select a, MAX(b), ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') from t1 group by a;
+select a, MAX(b), MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') from t1 group by a;
+drop table t1;