Heidi SQL 'Cannot close tab with running query'
Oh, dear, another case of a 3rd party software getting in the way.


Get a command window.
Open the "mysql" commandline tool.
SHOW PROCESSLIST;, identify the pid for the naughty query.
kill 1234; (or whatever the pid number is).


(If you were running the original query from "mysql", a simple CTRL-C would terminate it.  The above stuff would not be needed.)