Description:
Not all truncated digest_text values end with "..." - and no obvious reason why some do and some don't. Since the advent of adjustable digest length, our monitoring now checks servers for truncated digests, and if a certain % of them (by count_star) are, will send an alert to allocate more memory for a longer length. This has not been picking up a lot of truncated queries, and upon investigation, we see that many of these values are truncated without the trailing ellipsis, which is the documented behavior it's supposed to have. No clear reason why not, from a few samples I think it might be related to truncation in a long select field list (vs truncation after FROM), but I have no proof of that, it's just a guess.
There's no substitute way to test for truncation by length, either, as identifier length changes across tables - with max digest length at 1024, you can see a truncated one with 950 chars, a non-truncated one with 1000 chars, some with 1200 chars even.
How to repeat:
select digest_text from performance_schema.events_statements_summary_by_digest order by length(digest_text) desc;
check the top handful of these, many will be clearly cut off with no indication added.
Suggested fix:
Ensure that no matter what the case, a truncated digest_text ends with an ellipsis to clearly show that it was cut off.