diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-02-15 18:08:08 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-02-15 18:08:08 +0100 |
commit | 25609313ffbd9205e921d0793cf423f711d10ced (patch) | |
tree | f04a1c26fabcc5463aca51a860f03131e02d94f7 /mysql-test/t/sum_distinct.test | |
parent | 47a54a2e087a7c1fc861bcbc114c14987f492cfe (diff) | |
parent | 764eeeee74f999fe2107fc362236563be0025093 (diff) | |
download | mariadb-git-25609313ffbd9205e921d0793cf423f711d10ced.tar.gz |
5.3.4 merge
Diffstat (limited to 'mysql-test/t/sum_distinct.test')
-rw-r--r-- | mysql-test/t/sum_distinct.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/sum_distinct.test b/mysql-test/t/sum_distinct.test index c58155a8e25..633a72fddc8 100644 --- a/mysql-test/t/sum_distinct.test +++ b/mysql-test/t/sum_distinct.test @@ -93,3 +93,15 @@ SELECT SUM(DISTINCT id) FROM t1; SELECT SUM(DISTINCT id % 11) FROM t1; DROP TABLE t1; + +--echo # +--echo # Bug #777654: empty subselect in FROM clause returning +--echo # SUM(DISTINCT) over non-nullable field +--echo # + +CREATE TABLE t1 (a int NOT NULL) ; + +SELECT SUM(DISTINCT a) FROM t1; +SELECT * FROM (SELECT SUM(DISTINCT a) FROM t1) AS t; + +DROP TABLE t1; |