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:
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user