summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSinisa@sinisa.nasamreza.org <>2002-08-09 23:14:02 +0300
committerSinisa@sinisa.nasamreza.org <>2002-08-09 23:14:02 +0300
commita80d185e403720d060aa5c61a09e962e0abfb1f8 (patch)
tree6798f91768273fd1b7f7f80760084855d64d2523 /mysql-test
parentedf3929cd589d150adccefc754a979ce7e5d7e36 (diff)
downloadmariadb-git-a80d185e403720d060aa5c61a09e962e0abfb1f8.tar.gz
A change in IF behaviour that several users asked for ...
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_if.result2
-rw-r--r--mysql-test/t/func_if.test4
2 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result
index 85c4007f63c..f93f8028496 100644
--- a/mysql-test/r/func_if.result
+++ b/mysql-test/r/func_if.result
@@ -33,3 +33,5 @@ aa
aaa
sum(if(num is null,0.00,num))
144.54
+min(if(y -x > 5,y,NULL)) max(if(y - x > 5,y,NULL))
+6 56
diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test
index c5cc73ecd1f..85553d1a2fd 100644
--- a/mysql-test/t/func_if.test
+++ b/mysql-test/t/func_if.test
@@ -28,3 +28,7 @@ create table t1 (num double(12,2));
insert into t1 values (144.54);
select sum(if(num is null,0.00,num)) from t1;
drop table t1;
+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;