maria-developers team mailing list archive
Mailing list archive
Re: More Secure Kill Command
i think it too complex.. i should send two SQL command!?
i already know what thread and what query i want to kill... why should i
send it twice?
2013/8/17 Jean Weisbuch <jean@xxxxxxxxxx>
> If you want more safety then make a script like molly-guard that will ask
> you to confirm the kill command you want to execute to avoid mistakes.
> Le 16/08/2013 23:31, Roberto Spadim a écrit :
> Hi guys i was mailing at maria-discuss, but i think it a new feature, and
> want some view point from developers...
> check this problem:
> connection 1) big select...
> connection 2) show processlist
> connection 1) other query
> connection 2) kill connection 1 id (i take +- 1 second between show
> processlist and this command)
> connection 1) killed
> the problem? the kill connection 1 (KILL thread_id) killed the wrong
> could we implement something like:
> KILL [CONNECTION | QUERY] thread_id [QUERY "some relative unique query
> id in this database"]
> the relative unique query id, could be:
> substr(sha1 or md5 of (thread_id + query start time),0,6) (6 hex numbers
> is good?)
> it's like a git small hash commit id,
> maybe we could make it more unique... but since i will not use it very
> often, i think a less intensive work is nice here... a global query id
> could add more one lock for every query...
> KILL 1 QUERY "abcdef"
> the "abcdef" = substr(MD5( thread id + query start time ),0,6)
> we could add client ip or others unique information about this query,
> but something that don't increase (ok just a little) the load of a show
> processlist / select * from information_schema
> Mailing list: https://launchpad.net/~maria-developers
> Post to : maria-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-developers
> More help : https://help.launchpad.net/ListHelp