maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #00951
Re: More secure Kill command
well, like i told... the manual (5.7) only say about thread id, not query id
maybe it's time to implement
KILL [CONNECTION | QUERY] thread_id [QUERY "some relative unique query id
in this database"]
the unique query id, could be:
substr(sha1 or md5 of (thread_id + query start time),6)
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 a lock for nothing...
...
KILL [CONNECTION | QUERY] *thread_id*
*
-
KILL CONNECTION <http://dev.mysql.com/doc/refman/5.7/en/kill.html> is
the same as KILL <http://dev.mysql.com/doc/refman/5.7/en/kill.html> with
no modifier: It terminates the connection associated with the given
thread_id.
-
KILL QUERY <http://dev.mysql.com/doc/refman/5.7/en/kill.html> terminates
the statement that the connection is currently executing, but leaves the
connection itself intact.
*
2013/8/16 Roberto Spadim <roberto@xxxxxxxxxxxxx>
> hum same problem
> the ID is the connection id, not the query id...
> example
>
> if i execute: (1 = one connection, 2 = other connection)
> 1)mysql_connect... (create a connection id)
> 2)mysql_connect... (create a connection id)
> 1)show processlist (i will see 1 and 2 connection id)
> 1) select * from big table
> 2)show processlist -> let's tell it return connection: 1)id = 10, 2)id = 11
> 1) select * from another big table
> 1) select * from another big table
> 1) select * from another big table
> 1) select * from another big table
> 1) select * from another big table
> 1) select * from another big table
> 2)show processlist -> it return connection: 1)id = 10, 2)id = 11
> see? there's no change at id...
> maybe expose the query id solve this problem.. (in this case it should
> return ~8 to (1), and ~2 to (2)) i'm using mariadb 10.0.3 here
>
> any idea?
>
>
>
>
>
--
Roberto Spadim
SPAEmpresarial
References