Following query results into wrong output Q1. Q1 is shown as hex output, but ist should be the string Q:
select distinct
a.Rows,length(uncompress(a.Query)) n
,uncompress(a.Query) Q1
,cast(uncompress(a.Query) as char) Q
from MyTable a
A more simplified query example is:
select cast(uncompress(compress('abc')) as char) as test
Without cast expression you'll get hex output too, but it should be character...
(HeidiSQL, Ver. 9.4.0.5174)