← Back to team overview

maria-developers team mailing list archive

Re: More Secure Kill Command

 

Hi, Roberto!

On Aug 17, Roberto Spadim wrote:
> yeah i liked this idea about query_id too...

> the query_id is currently implemented? or should be implemented? sorry i'm
> asking without reading the source code ...

It is implemented. Currently, KILL works like (kill_one_thread function)

    while ((tmp=it++))
      if (tmp->thread_id == id)
        break;

to kill by query id, it should be simply

    while ((tmp=it++))
      if (tmp->query_id == id)
        break;
 
And some safety checks, of course. Not really a one-line change, but
close.

> about syntax, should it be
> KILL <thread_id> <query_id>
> or
> KILL <thread_id> QUERY <query id>
> ?

I don't have a good one. May be

  KILL QUERY ID nnn ?

So that the full syntax would be

  KILL [ CONNECTION | QUERY [ ID ] ] nnn;

Regards,
Sergei



References