← Back to team overview

maria-developers team mailing list archive

Re: More Secure Kill Command

 

humm... i will think more about this... maybe i'm too crazy (and unlucky)
to understand that the order isn't important...
i will check again what i write in last email...
please check too and tell me if the order of increase isn't a problem


2013/8/17 Roberto Spadim <roberto@xxxxxxxxxxxxx>

> sergei... one more point... i was looking the mk-kill
> http://linux.die.net/man/1/mk-kill
>
> there's some cases where we want to kill a thread that's no running any
> query and we need to kill it only when it is not running any query, in
> other words i can't use kill thread id, i must use kill query id....
> the point here is "how query id is increased?" for example..
>
>
> (query id = 0 thread id = 10)      <- kill query id =0
>
> [query received]
> query id ++ (query id = 1 thread id = 10)
> SELECT * FROM TABLE     <- kill query id =1
> [query done]
> (query id = 1 thread id = 10)     <- kill query id =1
>
>
> [query received]
> query id ++ (query id = 2 thread id = 10)
> SELECT * FROM TABLE     <- kill query id =2
> [query done]
> (query id = 2 thread id = 10) <- kill query id =2
>
>
> (query id = 2 thread id = 10)  <- kill query id =2
>
>
> if i send a KILL QUERY ID = 2, i will only kill the last SELECT, or if the
> select is done, i will kill the thread with the last executed query id = 2
>
> see the problem? the query id can't be reseted, and it MUST be increased
> only when we START a new query, not at the end of query, example:
>
>
>
>
> (query id = 0 thread id = 10)      <- kill query id =0
>
> [query received] (query id = 0 thread id = 10)
> *SELECT * FROM TABLE     <- kill query id =0*
> query id ++ (query id = 1 thread id = 10)
> [query done]
> *(query id = 1 thread id = 10)     <- **kill query id =1 !!!!*
>
>
> [query received] (query id = 1 thread id = 10)
> *SELECT * FROM TABLE     <- kill query id =1 !!!!*
> query id ++ (query id = 2 thread id = 10)
> [query done]
> (query id = 2 thread id = 10) <- kill query id =2
>
>
> ---
> Is the QUERY ID increased ONLY WHEN A QUERY START, AND the QUERY ID isn't
> reseted AFTER query execution?
>
> If yes, this is ok, we can kill a thread that is not running a query
> without problems using query id
> in this case no problems...
>
> bye
>



-- 
Roberto Spadim
SPAEmpresarial

Follow ups

References