Search code examples
mysqlblobgroup-concat

mysql GROUP_CONCAT always return blob I even change all the group_concat_max_len=100000000 help?


I have try almost every tutorial on the internet trying to change group_concat_max_len but as file my.ini didnt exist group_concat_max_len in wamp server, and I execute the following querys show variables like 'group%'; and SET @@group_concat_max_len = 9999999; but It say any rows affected how can I fix that? I dont find a solution please help

I already do a query but I does not work It returns blob

SET GLOBAL group_concat_max_len=4096;
SELECT correo_id_correo, GROUP_CONCAT(destinatario_id_usuario SEPARATOR ',') FROM correo_has_usuario GROUP BY correo_id_correo;

Solution

  • According to the manual page for GROUP_CONCAT():

    The result type is TEXT or BLOB unless group_concat_max_len is less than or equal to 512, in which case the result type is VARCHAR or VARBINARY.

    So increasing group_concat_max_len will not return VARCHAR or VARBINARY. You'd need to decrease it.