I hit a problematic bug that is probably from upstream : when some queries with special chars are ran on the server, mytop ends up acting like if a key was pressed and switches to the query summary view (sometimes it also triggers the help page).
I verified it on two different servers with the same kind of queries running on them (the same app is doing queries on these servers) while i couldnt reproduce it on other servers.
This is definitely a potential security issue as crafted queries might manage to execute commands on the client running mytop.
I havent reviewed the code yet but the problematic queries might have antislashes and control chars on them, a better sanitization of the datas retreived from the server should suffice but it doesnt explain why/how a query shown could simulate keystrokes to readkey.
ps: it also might be a terminal bug (running on xfce4terminal in my case), i will try to run mytop on a different terminal to rule that out.
ps 25/06: the same issue appears on Putty ran from Windows but it act like if it was the "h" key that was pressed while its usually the "c" key press that happens with xfce4terminal.
I couldnt reproduce so far the issue with the Debian Squeeze mytop package 1.6-6 (as i havent found a reproducible testcase i cant really confirm that it doesnt happens on this version).
This code is present in the Debian version and not on the MariaDB one and is most probably the solution to the bug : $thread->
{Info}
=~ s/[[:cntrl:]]/?/g;
Looked at diff, emailed Mark Grennan to ask him to accept it into mytop upstream.