diff options
author | Igor Babaev <igor@askmonty.org> | 2011-12-28 18:47:01 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-12-28 18:47:01 -0800 |
commit | 5ab628e0240ae280c0b5b03e1d64b2242cd7265e (patch) | |
tree | e2cc64323021a593c59f0f54978b006fc51b8686 /mysql-test/r/sum_distinct.result | |
parent | 31805e621495e33d4dcf4e4b2180d42367f90894 (diff) | |
download | mariadb-git-5ab628e0240ae280c0b5b03e1d64b2242cd7265e.tar.gz |
Fixed LP bug #777654.
The method Item_sum_num::fix_fields() calculated the value of
the flag Item_sum_num::maybe_null in some cases incorrectly.
Diffstat (limited to 'mysql-test/r/sum_distinct.result')
-rw-r--r-- | mysql-test/r/sum_distinct.result | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/sum_distinct.result b/mysql-test/r/sum_distinct.result index c615817f52d..2746f5a09f4 100644 --- a/mysql-test/r/sum_distinct.result +++ b/mysql-test/r/sum_distinct.result @@ -95,3 +95,15 @@ SELECT SUM(DISTINCT id % 11) FROM t1; SUM(DISTINCT id % 11) 55 DROP TABLE t1; +# +# Bug #777654: empty subselect in FROM clause returning +# SUM(DISTINCT) over non-nullable field +# +CREATE TABLE t1 (a int NOT NULL) ; +SELECT SUM(DISTINCT a) FROM t1; +SUM(DISTINCT a) +NULL +SELECT * FROM (SELECT SUM(DISTINCT a) FROM t1) AS t; +SUM(DISTINCT a) +NULL +DROP TABLE t1; |