Bug #62186 add a limit argument to group_concat
Submitted: 17 Aug 2011 2:42 Modified: 13 Oct 2011 9:08
Reporter: Bugs System Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: group_concat

[17 Aug 2011 2:42] Bugs System
Description:
I often find myself wanting to a query that uses group_concat but want to limimt the number of rows in the concat. Looking around I find many posts from people asking how to do this, so it would be useful addition to MySQL.

Yes I know that you can do a subquery, but perfomance-wise it's not the same as native support.

How to repeat:
do any group_concat query, and try to pass a limit argument

Suggested fix:
add a limit argument to group_concat
[13 Sep 2011 9:08] Valeriy Kravchuk
Why not to use group_concat_max_len server variable to limit size (see http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_group_concat_ma...)?
[13 Oct 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[19 Mar 2017 17:57] Rick James
group_concat_max_len would be useful only if the items being concatenated are constant length.  Otherwise, LIMIT seems to be a necessity.

Assuming that LIMIT is required, this could be "Dup of bug 30098".