summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-06-07 12:39:26 +0200
committerserg@serg.mylan <>2004-06-07 12:39:26 +0200
commit5d947f7b97542e85feea4eb646b9b04ba075be54 (patch)
tree621ec43e9b9fa671a549031ddb1784ff2df05d91 /mysql-test
parent05832cb70178ddff3a187ac6f2b17e39f5c25360 (diff)
parent86e9dc29b0c09a45a0aee85c96eb1ede650db45a (diff)
downloadmariadb-git-5d947f7b97542e85feea4eb646b9b04ba075be54.tar.gz
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_if.result6
-rw-r--r--mysql-test/t/func_if.test9
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;
+