summaryrefslogtreecommitdiff
path: root/mysql-test/t/func_group.test
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-03-15 03:46:19 +0300
committerkonstantin@mysql.com <>2005-03-15 03:46:19 +0300
commit6a2ef5577c390abb576cef354d26d8a211f82d7c (patch)
tree7afe84de6147f4619865e4f759eb1d0ad2f376f8 /mysql-test/t/func_group.test
parent98e83555a5a844dad395d17edf3c90f5de157689 (diff)
downloadmariadb-git-6a2ef5577c390abb576cef354d26d8a211f82d7c.tar.gz
WL#926 "AVG(DISTINCT) and other distincts", part 2 (out of 3): clean up
Item_sum_count_distinct, and deploy Unique for use with COUNT(DISTINCT) if there is no blob column in the list of DISTINCT arguments.
Diffstat (limited to 'mysql-test/t/func_group.test')
-rw-r--r--mysql-test/t/func_group.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index de9c7ff3ecb..0f03eae7e12 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -591,3 +591,13 @@ INSERT INTO t1 VALUES
(1,1,4), (2,2,1), (3,1,3), (4,2,1), (5,1,1);
SELECT MAX(id) FROM t1 WHERE id < 3 AND a=2 AND b=6;
DROP TABLE t1;
+
+#
+# Test that new VARCHAR correctly works with COUNT(DISTINCT)
+#
+
+CREATE TABLE t1 (a VARCHAR(400));
+INSERT INTO t1 (a) VALUES ("A"), ("a"), ("a "), ("a "),
+ ("B"), ("b"), ("b "), ("b ");
+SELECT COUNT(DISTINCT a) FROM t1;
+DROP TABLE t1;