>>>>> "Matthias" == Matthias Urlichs <smurf@stripped> writes:
Matthias> Michael Widenius:
Marc> Do you know how to kill a slow query automatically after 10 seconds?
>> Just let the perl do a "show processlist' every 5'th second and if any
>> queries have took more than 5 seconds, you can send a kill to it.
Matthias> What if the process is doing an extensive "copy to temp file"?
Matthias> MySQL 3.22.27 cannot kill such a process. Has this been fixed?
I just checked this code in MySQL 3.22 and couldn't find anything
where this could cause a problem (execpt if you get disk full).
At what kind of query have you seen this problem?
(I would need an EXPLAIN on the query or a repeatable example to be
able to comment).
The kill works by setting a flag in the thread structure. All loops in
that handles select's (in sql/sql_select.cc) does the following check:
It would be nice to know exactly in which loop the thread is
What happened when you did a 'mysqladmin kill'; Did the thread got
marked as killed in 'mysqladmin proc' ?