0

I have a SELECT statement in MySQL 5.6 which uses the group_concat function to create a delimited string from many database rows in a table. The length of the string should be several thousand characters in length, but MySQL seems to be automatically truncating the resulting string at 2048 characters.

How can I prevent this from happening?

GMB
  • 216,147
  • 25
  • 84
  • 135
Joe
  • 113
  • 4
  • 12
  • https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_group_concat_max_len – Akina Dec 08 '20 at 13:54

1 Answers1

2

You can change the value of parameter group_concat_max_len. If you wanted to do that at session-level, that would be:

set session group_concat_max_len = 1000000;
GMB
  • 216,147
  • 25
  • 84
  • 135