summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-06-07 12:39:26 +0200
committerunknown <serg@serg.mylan>2004-06-07 12:39:26 +0200
commit548f0240896b2cc10980cc77bd30133e8971c008 (patch)
tree621ec43e9b9fa671a549031ddb1784ff2df05d91 /mysql-test
parent030a698ecd1462d08e694f3be14717b7dd850058 (diff)
parent7dc2426be0b6a3db11249827f32aa45214fff1ec (diff)
downloadmariadb-git-548f0240896b2cc10980cc77bd30133e8971c008.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;
+