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

Status

Assignee

Unassigned

Reporter

StefanoR

Labels

External issue ID

None

External issue ID

None

Components

Fix versions

Affects versions

10.0
10.1
5.5

Priority

Critical