1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

a fix (Bug #3435: STDDEV|VARIANCE(constant) returns constant if no rows)

This commit is contained in:
ram@gw.mysql.r18.ru
2004-05-05 16:06:01 +05:00
parent 104fdf607d
commit 949c01bfa2
3 changed files with 18 additions and 0 deletions

View File

@ -648,3 +648,11 @@ select a from t1 having a=1;
a
1
drop table t1;
create table t1 (a int);
select variance(2) from t1;
variance(2)
NULL
select stddev(2) from t1;
stddev(2)
NULL
drop table t1;

View File

@ -387,3 +387,12 @@ insert into t1 values (1);
select max(a) as b from t1 having b=1;
select a from t1 having a=1;
drop table t1;
#
# Bug #3435: variance(const), stddev(const) and an empty table
#
create table t1 (a int);
select variance(2) from t1;
select stddev(2) from t1;
drop table t1;