1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00
(Bug #4035 GROUP_CONCAT with HAVING clause truncates field                       
Bug #4057 LEFT() function in HAVING clause truncates query result).
This commit is contained in:
ram@gw.mysql.r18.ru
2004-06-08 18:01:15 +05:00
parent 3786538112
commit 71eee450e0
6 changed files with 32 additions and 31 deletions

View File

@ -157,11 +157,8 @@ grp group_concat(c)
3 D,D,E
4
5 NULL
Warnings:
Warning 1260 1 line(s) was(were) cut by group_concat()
show warnings;
Level Code Message
Warning 1260 1 line(s) was(were) cut by group_concat()
set group_concat_max_len = 1024;
select group_concat(sum(a)) from t1 group by grp;
ERROR HY000: Invalid use of group function
@ -310,3 +307,14 @@ GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a)
1,2
2,4
DROP TABLE t1, t2;
CREATE TABLE t1 (a char(4));
INSERT INTO t1 VALUES ('John'), ('Anna'), ('Bill');
SELECT GROUP_CONCAT(a SEPARATOR '||') AS names FROM t1
HAVING names LIKE '%An%';
names
John||Anna||Bill
SELECT GROUP_CONCAT(a SEPARATOR '###') AS names FROM t1
HAVING LEFT(names, 1) ='J';
names
John###Anna###Bill
DROP TABLE t1;