diff options
author | unknown <sergefp@mysql.com> | 2004-12-11 20:02:45 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-12-11 20:02:45 +0300 |
commit | b18e8c92bc12b21026882e157f5c31a8c2fb4408 (patch) | |
tree | f1ad3d087f9ecec772ae154b44d910233d435567 /mysql-test | |
parent | 8e4251dd855e81215281b958e97a3dc6b9153a4b (diff) | |
parent | b5c119e7c0f3b0ff6885c0dc247f53902ef7f621 (diff) | |
download | mariadb-git-b18e8c92bc12b21026882e157f5c31a8c2fb4408.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/dbdata/psergey/mysql-4.0-bug6976
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/group_by.result | 12 | ||||
-rw-r--r-- | mysql-test/t/group_by.test | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index dba95614052..f636692c0d9 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -626,3 +626,15 @@ explain SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL; table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 6 Using filesort DROP TABLE t1; +create table t1 (a int); +insert into t1 values(null); +select min(a) is null from t1; +min(a) is null +1 +select min(a) is null or null from t1; +min(a) is null or null +1 +select 1 and min(a) is null from t1; +1 and min(a) is null +1 +drop table t1; diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 58bb4b3e268..5af78b924f8 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -447,3 +447,12 @@ INSERT INTO t1 VALUES (1,2),(2,3),(4,5),(3,5),(1,5),(23,5); SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL; explain SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL; DROP TABLE t1; + +#Test for BUG#6976: Aggregate functions have incorrect NULL-ness +create table t1 (a int); +insert into t1 values(null); +select min(a) is null from t1; +select min(a) is null or null from t1; +select 1 and min(a) is null from t1; +drop table t1; + |