diff options
author | unknown <ram@gw.mysql.r18.ru> | 2004-10-11 18:38:48 +0500 |
---|---|---|
committer | unknown <ram@gw.mysql.r18.ru> | 2004-10-11 18:38:48 +0500 |
commit | 47f8a473bd1179c7622deab59b491f5a9d91b211 (patch) | |
tree | 1284afe19e807c2e3e78bc52396ba3c43d3fd568 /mysql-test/t/func_group.test | |
parent | 1073271b1c19f57990cd58a22b9ae09953d042aa (diff) | |
download | mariadb-git-47f8a473bd1179c7622deab59b491f5a9d91b211.tar.gz |
A fix (bug #5615 type of aggregate function column wrong when using group by).
mysql-test/r/func_group.result:
test case (bug #5615 type of aggregate function column wrong when using group by)
mysql-test/t/func_group.test:
test case (bug #5615 type of aggregate function column wrong when using group by)
sql/sql_select.cc:
A fix (bug #5615 type of aggregate function column wrong when using group by):
should create a temporary field of the proper type in case of
MIN|MAX(field).
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r-- | mysql-test/t/func_group.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 3e001961f90..ecd3bf97f0b 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -458,3 +458,13 @@ INSERT INTO t1 VALUES select val, count(*) from t1 group by val; drop table t1; + +# +# Bug #5615: type of aggregate function column wrong when using group by +# + +create table t1(a int, b datetime); +insert into t1 values (1, NOW()), (2, NOW()); +create table t2 select MAX(b) from t1 group by a; +show create table t2; +drop table t1, t2; |