The mysql command-line tool inteprets Ctrl+C as a request to interrupt the running query. But the new wrapper also gets the SIGINT and exits back to the shell, leaving both mysql and the shell trying to use the terminal.
A lesser issue is that Ctrl+Z properly suspends both mysql and the wrapper, but executing fg does not seem to send SIGCONT through to mysql.