diff options
author | unknown <serg@serg.mylan> | 2004-06-07 12:38:35 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-06-07 12:38:35 +0200 |
commit | 7dc2426be0b6a3db11249827f32aa45214fff1ec (patch) | |
tree | 5097b350aadfa7b9ac7db9eba46616b817ebe2ad /mysql-test | |
parent | 256bada7e27da7f9475ea29951010d878f8c896f (diff) | |
download | mariadb-git-7dc2426be0b6a3db11249827f32aa45214fff1ec.tar.gz |
BUG#3987 - if(int, aggregate(int))
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_if.result | 6 | ||||
-rw-r--r-- | mysql-test/t/func_if.test | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 470004d2646..aee54ede324 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -58,3 +58,9 @@ select min(if(y -x > 5,y,NULL)), max(if(y - x > 5,y,NULL)) from t1; min(if(y -x > 5,y,NULL)) max(if(y - x > 5,y,NULL)) 6 56 drop table t1; +create table t1 (a int); +insert t1 values (1),(2); +select if(1>2,a,avg(a)) from t1; +if(1>2,a,avg(a)) +1.5000 +drop table t1; diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test index 1f95239bf4b..5e605dbe97b 100644 --- a/mysql-test/t/func_if.test +++ b/mysql-test/t/func_if.test @@ -38,3 +38,12 @@ create table t1 (x int, y int); insert into t1 values (0,6),(10,16),(20,26),(30,10),(40,46),(50,56); select min(if(y -x > 5,y,NULL)), max(if(y - x > 5,y,NULL)) from t1; drop table t1; + +# +# BUG#3987 +# +create table t1 (a int); +insert t1 values (1),(2); +select if(1>2,a,avg(a)) from t1; +drop table t1; + |