Buffer size issue?
I have a query that returns a string considerably longer than 1024 characters. It was working properly in MariaDB 5.1.
I have upgraded to 10.1.8, and it appears that the query return is being truncated at 1024 characters. I see this behaviour in three separate tools, including php mysql calls, phpMyAdmin, and the mysql command line tool. (It was the mysql CLI, piped to wc, that told me that exactly 1024 characters were being sent, but no more.)
Assuming this is not a bug, but rather some variable to be tweaked, can someone point me in the right direction?
Thanks in advance!
BTW: Here is the query, which has not changed since it was written in 5.1:
<pre>SELECT GROUP_CONCAT(DISTINCT '<a href="/wiki/', p.family, '" title="', f.explanation, '">', p.family, '</a>' ORDER BY p.family SEPARATOR ', ') FROM s_plants p LEFT JOIN s_plant_families f ON p.family = f.family</pre>
This query basically returns a string containing a long list of plant family names, wrapped in HTML links. This is what I get back:
<pre><a href="/wiki/Agavaceae" title="Agave family">Agavaceae</a>, <a href="/wiki/Aizoaceae" title="Fig-Marigold or Ice Plant family">Aizoaceae</a>, <a href="/wiki/Alliaceae" title="Onion and Garlic family">Alliaceae</a>, <a href="/wiki/Amaranthaceae" title="Amaranth family">Amaranthaceae</a>, <a href="/wiki/Anacardiaceae" title="Cashew or Sumac family">Anacardiaceae</a>, <a href="/wiki/Apiaceae" title="Celery or Carrot family, formerly Umbelliferae">Apiaceae</a>, <a href="/wiki/Apocynaceae" title="Periwinkle family">Apocynaceae</a>, <a href="/wiki/Araliaceae" title="Ginseng family">Araliaceae</a>, <a href="/wiki/Asteraceae" title="Daisy family, formerly Compositae">Asteraceae</a>, <a href="/wiki/Boraginaceae" title="Forget-me-Not family">Boraginaceae</a>, <a href="/wiki/Brassicaceae" title="Cabbage family, formerly Cruciferae">Brassicaceae</a>, <a href="/wiki/Campanulaceae" title="Bellflower Family">Campanulaceae</a>, <a href="/wiki/Caprifoliaceae" title="Honeysuckle family">Caprifoliaceae</a>, <a href="/wiki/Car</pre>
That last link with the open quote in the open anchor tag sure plays havoc with the rest of the page... :-)
Answer Answered by Jan Steinman in this comment.
Found it! (group_concat_max_len) I basically went to the Variables page of phpMyAdmin and searched for "1,024" until I saw one that looked like it would apply.
I rather arbitrarily set this to 16k (16,384). Is that likely to have any other impact?