diff options
author | unknown <monty@mashka.mysql.fi> | 2003-04-15 22:04:16 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-04-15 22:04:16 +0300 |
commit | 3ac05ea4812531bd213de6b35508d7da0a679378 (patch) | |
tree | 59cab832c43f9b1e9dcb2b6d434d33955fd2c07e /mysql-test/t/func_group.test | |
parent | 909596e030134e96a4cb403c92ed57570b6b7157 (diff) | |
download | mariadb-git-3ac05ea4812531bd213de6b35508d7da0a679378.tar.gz |
Fixed bug in SUM() with NULL:s
Added logging of warnings for failed connections with ssl.
Fixed bug in symbolic link handling on Windows
include/my_global.h:
Added replication flags from 4.1
mysql-test/r/func_group.result:
Added test for SUM(NULL)
mysql-test/t/func_group.test:
Added test for SUM(NULL)
sql/item_sum.cc:
Fixed bug in SUM() with NULL:s
sql/item_sum.h:
Fixed bug in SUM() with NULL:s
sql/mysqld.cc:
Added option --symbolic-links
Fixed bug in symbolic link handling on Windows
sql/net_serv.cc:
Code cleanup
sql/sql_acl.cc:
Added logging of warnings for failed connections with ssl.
sql/sql_show.cc:
Changed to use HAVE_REPLICATION instead of EMBEDDED_LIBRARY
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r-- | mysql-test/t/func_group.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 1915c2172ad..40d829d3e70 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -126,3 +126,24 @@ select max(t1.a2) from t1 left outer join t2 on t1.a1=10 where t1.a1=20; select max(t1.a2) from t1 left outer join t2 on t1.a1=10 where t1.a1=10; select max(t2.a1) from t1 left outer join t2 on t1.a2=t2.a1 and 1=0 where t2.a1='AAA'; drop table t1,t2; + +# +# Test of group function and NULL values +# + +CREATE TABLE t1 (a int, b int); +select count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1; +select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +insert into t1 values (1,null); +select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +insert into t1 values (1,null); +insert into t1 values (2,null); +select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +insert into t1 values (2,1); +select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +insert into t1 values (3,1); +select a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +select SQL_BIG_RESULT a,count(b), sum(b), avg(b), std(b), min(b), max(b), bit_and(b), bit_or(b) from t1 group by a; +drop table t1; |