1279
MariaDBwarningqueryhigh confidence
Row was cut by GROUP_CONCAT()
Production Risk
High — data is silently truncated; application logic may act on an incomplete value.
What this means
The result of GROUP_CONCAT() was silently truncated because it exceeded group_concat_max_len.
Why it happens
- 1group_concat_max_len is set too low (default 1024 bytes)
- 2Concatenating many rows or long strings
How to reproduce
trigger — this will error
trigger — this will error
SELECT GROUP_CONCAT(col) FROM large_table;
expected output
Warning 1279: Row N was cut by GROUP_CONCAT()
Fix 1
Increase group_concat_max_len for the session
Increase group_concat_max_len for the session
SET SESSION group_concat_max_len = 1000000;
Why this works
Raises the limit so the full result fits.
Fix 2
Use JSON_ARRAYAGG() in MySQL 8.0+
Use JSON_ARRAYAGG() in MySQL 8.0+
SELECT JSON_ARRAYAGG(col) FROM t;
Why this works
Not subject to group_concat_max_len; returns a JSON array.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 1279 ER_CUT_VALUE_GROUP_CONCAT
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev