summaryrefslogtreecommitdiff
path: root/mysql-test/t/olap.test
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-03-16 15:55:04 -0800
committerunknown <igor@rurik.mysql.com>2005-03-16 15:55:04 -0800
commit31f6b0dde83e7c4fc1626958f40f2c22ca51f23b (patch)
treeaea08e93e777896437566b45ea6a3d9a6aa0eb50 /mysql-test/t/olap.test
parente16535ce1957567b1f176bdbcda766a8104a5072 (diff)
downloadmariadb-git-31f6b0dde83e7c4fc1626958f40f2c22ca51f23b.tar.gz
olap.result, olap.test:
Added a test for bug #8615. sql_select.cc: Fixed bug #8615. This fix only removed the cause of the reported crash. It does not resolve other problems of rollup queries with DISTINCT. They were fixed in the previous patch for bug 8616. sql/sql_select.cc: Fixed bug #8615. This fix only removed the cause of the reported crash. It does not resolve other problems of rollup queries with DISTINCT. They were fixed in the previous patch for bug 8616. mysql-test/t/olap.test: Added a test for bug #8615. mysql-test/r/olap.result: Added a test for bug #8615.
Diffstat (limited to 'mysql-test/t/olap.test')
-rw-r--r--mysql-test/t/olap.test5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysql-test/t/olap.test b/mysql-test/t/olap.test
index d2ea582e58c..6778af3d533 100644
--- a/mysql-test/t/olap.test
+++ b/mysql-test/t/olap.test
@@ -126,7 +126,7 @@ SELECT
DROP TABLE user_day;
#
-# Test for bug #8616: distinct sum with rollup
+# Tests for bugs #8616, #8615: distinct sum with rollup
#
CREATE TABLE t1 (a int, b int);
@@ -150,5 +150,8 @@ SELECT SUM(b), COUNT(DISTINCT b), COUNT(*) FROM t1 GROUP BY a WITH ROLLUP;
SELECT DISTINCT SUM(b), COUNT(DISTINCT b), COUNT(*) FROM t1
GROUP BY a WITH ROLLUP;
+SELECT a, sum(b) FROM t1 GROUP BY a,b WITH ROLLUP;
+SELECT DISTINCT a, sum(b) FROM t1 GROUP BY a,b WITH ROLLUP;
+
DROP TABLE t1;