Bug #37874 description of @@group_concat_max_len lacks unit specification (bytes vs chars)
Submitted: 4 Jul 2008 14:02 Modified: 11 Jul 2008 20:07
Reporter: Roland Bouman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[4 Jul 2008 14:02] Roland Bouman
Description:
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#option_mysqld_group_co...

reads:

"
group_concat_max_len
[...]
The maximum allowed result length for the GROUP_CONCAT() function. 
The default is 1024.
"

However it does not say in what unit the length is specified, bytes or characters.

How to repeat:
NP

Suggested fix:
I can't vouch for it 100% if this intended, but I think it is currently used as a number of bytes, not characters:

mysql> select char_length('中'),length('中');
+--------------------+---------------+
| char_length('中') | length('中') |
+--------------------+---------------+
|                  1 |             3 |
+--------------------+---------------+
1 row in set (0.00 sec)

mysql> select group_concat('中') from (select 1 union select 2 union select 3) a;
+---------------------+
| group_concat('中') |
+---------------------+
| 中,中,            |
+---------------------+
1 row in set, 1 warning (0.00 sec)

mysql> show warnings;
+---------+------+--------------------------------------+
| Level   | Code | Message                              |
+---------+------+--------------------------------------+
| Warning | 1260 | 1 line(s) were cut by GROUP_CONCAT() |
+---------+------+--------------------------------------+
1 row in set (0.00 sec)

mysql>
[4 Jul 2008 14:04] Roland Bouman
arg...I forgot to post the setting fro @@max_group_concat_max_len:

mysql> select @@group_concat_max_len;
+------------------------+
| @@group_concat_max_len |
+------------------------+
|                     10 |
+------------------------+
1 row in set (0.00 sec)
[4 Jul 2008 15:31] Valeriy Kravchuk
Thank you for a reasonable documentation request.
[11 Jul 2008 20:07] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

The unit is bytes.