This happens a lot, and usually I can just press continue, and continue. But not always. Sometimes HeidiSQL shuts down.
As soon as I touch the screen, the characters disappear, so I can't do a screen shot. Then I realised that I have a camera on my phone - DUH... (:->
So, at last! - a screen shot, and an error log.
The query is select * from messages where msgFrom = 109222 or msgTo = 109222 The end of the query gets chopped off, and "dirty characters" appear to the right of it.
This has been happening on and off since I started using HeidiSQL.
I am not sure if this has any relationship to https://www.heidisql.com/forum.php?t=12698#p12814 - Garbage in query log
I noticed the last comment on that post, I never use more than one instance of HeidiSQL, and I had only one connection to a database open.