From 7b4385f4725f99ed5115b0f89174fc358498cfe0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 May 2005 10:54:33 +0500 Subject: a fix (bug #7405: group_concat with distinct and rollup => ignores distinct in some rows). sql/item_sum.cc: a fix (bug #7405: group_concat with distinct and rollup => ignores distinct in some rows). Code changed in order to work with rollup extension. --- mysql-test/t/func_gconcat.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t/func_gconcat.test') diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index d32c8796075..485e8ba143c 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -292,3 +292,15 @@ create table r2 (a int, b int); insert into r2 values (1,1), (2,2); select b x, (select group_concat(x) from r2) from r2; drop table r2; + +# +# Bug #7405: problems with rollup +# + +create table t1 (d int, a int, b int, c int); +insert into t1(a,b) values (1,3), (1,4), (1,2), (2,7), (1,1), (1,2), (2,3), (2,3); +select a, group_concat(b) from t1 group by a with rollup; +select a, group_concat(distinct b) from t1 group by a with rollup; +select a, group_concat(b order by b) from t1 group by a with rollup; +select a, group_concat(distinct b order by b) from t1 group by a with rollup; +drop table t1; -- cgit v1.2.1