Bug #20781 KILLALL [WHERE condition, ...]

Submitted: 29 Jun 2006 16:38 Modified: 30 Jun 2006 13:43
Reporter: Dean Swift Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:5.0.22 OS:Windows (Windows)
Assigned to: CPU Architecture:Any

[29 Jun 2006 16:38] Dean Swift
Description:
It would be useful to drop multiple connections with a single command. This could be performed with a KILLALL command, which is consistent with Unix. Furthermore, the conditions could be SQL conditions, for example KILLALL WHERE user='bob', KILLALL WHERE user<>'root', KILLALL WHERE host LIKE 'backup.%' or KILLALL WHERE db='world'.

How to repeat:
mysql> SHOW PROCESSLIST;
+----+------+----------------+-------+---------+------+-------+-----------------
-+
| Id | User | Host           | db    | Command | Time | State | Info
 |
+----+------+----------------+-------+---------+------+-------+-----------------
-+
|  1 | root | localhost:1092 | world | Query   |    0 | NULL  | SHOW PROCESSLIST
 |
+----+------+----------------+-------+---------+------+-------+-----------------
-+
1 row in set (0.00 sec)

mysql> KILLALL WHERE user=root;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'KILLA
LL WHERE user=root' at line 1

Suggested fix:
Currently requires a script but this increases scope for error.
[30 Jun 2006 13:43] Valeriy Kravchuk
Thank you for a reasonable feature request.
[14 Aug 2009 20:05] Mo Sayed
It's been a few years since this feature was requested. I'd like to second this feature request, it would be tremendously useful.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.059 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.