Entry
How can I abort a slow query in MySQL?
Do all queries get killed if I kill the MySQL session?
May 11th, 2000 16:34
Nathan Wallace, Sasha Pachev
The query does always not die when the client dies - only if it tries to
write the data to the client. If it takes a while to produce the data,
it will be a while before it discovers that the client is dead. When you
issue the kill command, the thd->killed flag is set and the next time
the query processing code checks it (which happens on every iteration /
row read / quite frequently), it will no the query needs to be aborted.
You need to use the kill command in mysqladmin to properly abort a
query.