1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

func_gconcat.result, func_gconcat.test:

Added test cases for bug #12863.
item_sum.cc, item_sum.h:
  Fixed bug #12863.
  Added a flag to Item_func_group_concat set to FALSE after
  concatenation of the first element of a group.
This commit is contained in:
igor@rurik.mysql.com
2005-09-06 22:20:11 -07:00
parent 81948e621a
commit af9740d0fd
4 changed files with 42 additions and 3 deletions

View File

@@ -560,3 +560,23 @@ group_concat('x')
NULL
1
drop table t1;
CREATE TABLE t1 (id int, a varchar(9));
INSERT INTO t1 VALUES
(2, ''), (1, ''), (2, 'x'), (1, 'y'), (3, 'z'), (3, '');
SELECT GROUP_CONCAT(a) FROM t1;
GROUP_CONCAT(a)
,,x,y,z,
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1;
GROUP_CONCAT(a ORDER BY a)
,,,x,y,z
SELECT GROUP_CONCAT(a) FROM t1 GROUP BY id;
GROUP_CONCAT(a)
,y
,x
z,
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY id;
GROUP_CONCAT(a ORDER BY a)
,y
,x
,z
DROP TABLE t1;