diff options
author | unknown <serg@serg.mysql.com> | 2003-03-11 21:20:53 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2003-03-11 21:20:53 +0100 |
commit | dccac5839636906822aa4e07fb7da79fb2668ab6 (patch) | |
tree | c76eced132524e977b9e4608a4e534482170b908 /mysql-test | |
parent | 312f0366bc392e072683a7612c465524cfbde524 (diff) | |
download | mariadb-git-dccac5839636906822aa4e07fb7da79fb2668ab6.tar.gz |
fixed an obscure bug in group by + having + Item_ref::get_date
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/group_by.result | 1 | ||||
-rw-r--r-- | mysql-test/t/group_by.test | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 113f8325685..0073827056d 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -128,3 +128,4 @@ a MAX(b) ELT(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f') a MAX(b) MAKE_SET(MAX(b), 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h') 1 4 c 10 43 a,b,d,f +a c count(distinct rand()) diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 6e256d7896f..20e11713d31 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -346,3 +346,11 @@ 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; + +# not purely group_by bug, but group_by is involved... + +create table t1 (a date default null, b date default null); +insert t1 values ('1999-10-01','2000-01-10'), ('1997-01-01','1998-10-01'); +select a,min(b) c,count(distinct rand()) from t1 group by a having c<a + interval 1 day; +drop table t1; + |