1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#3987 - if(int, aggregate(int))

This commit is contained in:
serg@serg.mylan
2004-06-07 12:38:35 +02:00
parent 5bd03da8b2
commit 86e9dc29b0
3 changed files with 17 additions and 2 deletions

View File

@ -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;

View File

@ -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;