Permalink
Browse files

time limit

  • Loading branch information...
1 parent bc6c5dd commit a534c0a72cf8fc07c2a796075fb95c82f8ed041c @ozgurkuru committed Apr 16, 2011
Showing with 4 additions and 5 deletions.
  1. +4 −5 mysql_tools/kill.php
View
@@ -47,11 +47,10 @@
$result = mysql_query("SHOW FULL PROCESSLIST");
while ($row=mysql_fetch_array($result)) {
$process_id=$row["Id"];
- if (strpos($row['Host'],"$content")!==false ) {
- echo "KILL query $process_id";
- $sql="KILL $process_id";
- mysql_query($sql);
- }
+ if ($row["Time"] > 100 ) {
+ $sql="KILL $process_id";
+ mysql_query($sql);
+ }
}
}
?>

0 comments on commit a534c0a

Please sign in to comment.