GROUP_CONCAT Truncation Problem
Date: 06/13/07
(MySQL Communtiy) Keywords: mysql, sql
I have a query that worked fine against the MySQL 4.0.x binaries, but when I perform the same query on a 5.0.x install I have a problem. I'm using a query with a GROUP_CONCAT clause to put the results into a single field. This is a section of the query, just to show how I'm using it:
GROUP_CONCAT( DISTINCT album ORDER BY album SEPARATOR '||' ) AS album_list
The problem is that it seems to truncate all results at exactly 341 characters. Again, on 4.x it worked fine, but something changed in 5.x that now limits the size of the returned dataset. I read something about group_concat_max_len and a MySQL bug with utf8 columns (all of my tables are utf8). Has anyone come across this problem or a solution? How does one set the group_concat_max_len variable--is that an SQL command or a DB startup parameter?
Source: http://community.livejournal.com/mysql/114840.html