What is the maximum allowance for group_concat_max_len in MySQL?

user3422637 picture user3422637 · Oct 24, 2014 · Viewed 45.6k times · Source

I am using a group_concat to concatenate a lot of rows into one.

I set group concat to 10000 using:

SET group_concat_max_len = 10000;

But even then, my output cells remain incomplete and end with ...

I tried setting group_concat_max_len = 20000 and even that didn't help.

I also tried setting group_concat_max_len to 99999999. It still doesn't complete my output text. And I checked one of the group concat stops at Length = 230 characters and then gives ...

Is there any other way?

Answer

Bill Karwin picture Bill Karwin · Oct 24, 2014

Check out this link: https://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_group_concat_max_len

All the MySQL configuration variables are documented on that page, with details like minimum, maximum, default value, whether you can set them globally or per-session, whether you can change them on a running instance or does it require a restart, and other description of usage.

The maximum value for group_concat_max_len is 18446744073709551615.

The group-concat string does not end with "..." If you try to group too much text, it just gets truncated. So I wonder if the problem is not with MySQL's settings, but with the display of your cells.