Yes, I used some of your patches. Thanks for sharing them.> That was the patch that i sent on MDEV, just a raw idea, but worked, maybe
> a copy and paste hehe =)
> there was a warning in gcc about unsigned and signed when i put the patchIn your patch `id` is ulong and `query_id` is int64. In my patch `id` is longlong,
> in jira, but i didn't removed
> maybe "if ((longlong) (tmp->query_id)==id)" could remove the warning, but i
> don't know if it's ok
so it is not affected.
I'll leave it up to you to convince Serg to use your syntax. :)> > > So, you implemented KILL [ CONNECTION | QUERY ] [ ID ] expr
> > > It allows, in particular
> > >
> > > KILL CONNECTION ID 10
> >
> I like the QUERY_ID with underscore to know that we are talking about the
> query_id, not the thread_id
> example:
> KILL CONNECTION QUERY_ID 99999
> KILL QUERY QUERY_ID 99999
My preference is to kill connection by thread_id and query by query_id,
because I normally either want to stop a particular query, or stop all
activity in particular connection. But it is incompatible change.
Justin Swanhart greenlion@gmail.com Percona, Inc Hi, KILL THREAD THREAD_ID WITH QUERY_ID QUERY_ID and KILL QUERY THREAD_ID WITH QUERY_ID QUERY_ID and possibly KILL QUERY WITH QUERY_ID should be supported. This is a very important and missing feature which is included in other forks. I_S.PROCESS_LIST should be extended to include QUERY_ID (you can get query_id from SHOW commands but not I_S). The above KILL commands if the QUERY_ID no longer exists on the system, thus you can KILL a SELECT without worrying that it has moved on to creating a new transaction or statement.
Heh, what about DELETE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ...? But I guess> another question :) maybe in futures MDEV could be nice something like:
> KILL QUERY_ID IN (1,2,3,4,5) or
> KILL QUERY_ID IN (SELECT QUERY_ID FROM information_schema.PROCESSLIST WHERE
> ..... )
> KILL THREAD_ID IN (1,2,3,4,5) or
> KILL THREAD_ID IN (SELECT ID FROM information_schema.PROCESSLIST WHERE
> ..... )
> KILL CONNECTION QUERY_ID IN (1,2,3,4,5) or
> KILL CONNECTION QUERY_ID IN (SELECT QUERY_ID FROM
> information_schema.PROCESSLIST WHERE ..... )
> KILL CONNECTION THREAD_ID IN (1,2,3,4,5) or
> KILL CONNECTION THREAD_ID IN (SELECT ID FROM information_schema.PROCESSLIST
> WHERE ..... )
>
> it's another mdev, but what you think about it?
that'll be quite complex.
ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO, TIME_MS, STAGE, MAX_STAGE, PROGRESS, MEMORY_USED, EXAMINED_ROWS, QUERY_ID
Anyway we didn't yet implement multi-process kill. Feel free to create another
MDEV.
Regards,
Sergey