summaryrefslogtreecommitdiff
path: root/mysql-test/r/sum_distinct.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/sum_distinct.result')
-rw-r--r--mysql-test/r/sum_distinct.result12
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;