GROUP_CONCAT truncate output to 65.536 chars when using DISTINCT or ORDER BY

Description

As in the summary, I try to GROUP_CONCAT a LONGTEXT field; result is fine if I don'use DISTINCT or ORDER BY as options for the GROUP BY function, otherwise the result is truncated to 65.536 chars (maybe the result is VARCHAR?).
I've already set the variable group_concat_max_len to 100.000.000.
However the query return a warning of the result will be truncated.

Environment

None

Assignee

Unassigned

Reporter

StefanoR

Labels

Components

Fix versions

Affects versions

Priority

Critical
Configure