summaryrefslogtreecommitdiff
path: root/mysql-test/t/group_by.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/group_by.test')
-rw-r--r--mysql-test/t/group_by.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index fbd39019e6d..21d5abcc287 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -522,3 +522,20 @@ insert into t1 values(3000000000);
select * from t1;
select min(b) from t1;
drop table t1;
+
+#
+# Test for bug #11088: GROUP BY a BLOB colimn with COUNT(DISTINCT column1)
+#
+
+CREATE TABLE t1 (id int PRIMARY KEY, user_id int, hostname longtext);
+
+INSERT INTO t1 VALUES
+ (1, 7, 'cache-dtc-af05.proxy.aol.com'),
+ (2, 3, 'what.ever.com'),
+ (3, 7, 'cache-dtc-af05.proxy.aol.com'),
+ (4, 7, 'cache-dtc-af05.proxy.aol.com');
+
+SELECT hostname, COUNT(DISTINCT user_id) as no FROM t1
+ WHERE hostname LIKE '%aol%'
+ GROUP BY hostname;
+