[MDEV-4911] add KILL query id, and add query id information to processlist Created: 2013-08-17 Updated: 2013-10-03 Resolved: 2013-09-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | 10.0.5 |
| Type: | Task | Priority: | Major |
| Reporter: | roberto spadim | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
This MDEV comes from a sync problem about SHOW PROCESSLIST and KILL command, i will add two parts to this MDEV: — there's two connections (1) and (2) and they will execute some commands: 1) SELECT * FROM A_BIG_TABLE_THAT_WILL_EXPEND_MANY_TIME
1) BEGIN TRANSACTION 1) NOOOOOOOOOOO! MY BEGIN TRANSACTION WAS KILLED! =] removing the last two commands, the problem here is how to kill the right query, and not the right thread... well contacting Sergei Golubchik and maria-developer / maria-discussiong mail list, i think the best way is: 1) add a new parameter to KILL command, the new syntax is:
examples:
new KILL commands:
I was thinking about add a redundant command with thread id + query id, and asked to sergei... 2) we WILL NOT change the protocol kill command that's all! good job =) — SELECT * FROM information_schema.PROCESSLIST
—
—
— 1) the KILL QUERY_ID 1,2,3,4,5 don't work, that's my first patch with sql_yacc.yy maybe i done something wrong since %expect changed +8 numbers 2) the QUERY_ID isn't what i want but well worked hehehehe, maybe change the syntax and make it more beautiful 3) there's some warnings in gcc that must be checked (signed compare with unsigned), and others case) that don't use the right flag (i add a bit = 16 for KILL_QUERY command) 4) the KILL QUERY_ID <non exists query id>, return a error something like "thread id not found", must be "query id not found" 5) i don't remember if have other problem... |
| Comments |
| Comment by Sergei Golubchik [ 2013-08-18 ] |
|
Actually, I was saying KILL [ CONNECTION | QUERY [ ID ] ] id that is, allowing only variants as below: KILL thread_id with no variant that allows to kill a connection using a query id. |
| Comment by roberto spadim [ 2013-08-18 ] |
|
hahaha sorry but this don't add the maybe this is better: |
| Comment by roberto spadim [ 2013-08-18 ] |
|
description rewrite to allow the new syntax |
| Comment by roberto spadim [ 2013-08-18 ] |
|
there's some problem killing a connection with a query id? i'm talking about internally in source code... |
| Comment by roberto spadim [ 2013-08-18 ] |
|
must test |
| Comment by roberto spadim [ 2013-08-18 ] |
|
developers check that i'm adding the IF_IDLE patch before this one... |
| Comment by roberto spadim [ 2013-08-18 ] |
|
this patch is blocked by from |
| Comment by roberto spadim [ 2013-08-18 ] |
|
TODO: the main problem now is: everything else is done |
| Comment by roberto spadim [ 2013-08-18 ] |
|
for now it do the job, but i don'tk now if parser is ok... |
| Comment by roberto spadim [ 2013-08-18 ] |
|
kill query_id 14; must understand how to add a new error mensage |
| Comment by roberto spadim [ 2013-08-18 ] |
|
kill query_id 14, 15 |
| Comment by roberto spadim [ 2013-08-18 ] |
|
well i will sleep it's 8AM now! bye |
| Comment by roberto spadim [ 2013-08-23 ] |
|
Hi sergey, i`m stalled here, and don`t know how to continue and solve this problems 1) the KILL QUERY_ID 1,2,3,4,5 don't work, that's my first patch with sql_yacc.yy maybe i done something wrong since %expect changed +8 numbers 2) the QUERY_ID isn't what i want but well worked hehehehe, maybe change the syntax and make it more beautiful 3) there's some warnings in gcc that must be checked (signed compare with unsigned), and others case) that don't use the right flag (i add a bit = 16 for KILL_QUERY command), is this the right way to include new kill option? 4) the KILL QUERY_ID <non exists query id>, return a error something like "thread id not found", must be "query id not found" 5) i don't remember if have other problem... could you check? thanks |
| Comment by Sergey Vojtovich [ 2013-09-11 ] |
|
Sergei, please review patch for this task. |
| Comment by Sergey Vojtovich [ 2013-09-12 ] |
|
Patch attached (original patch didn't reach commits@). |
| Comment by roberto spadim [ 2013-09-12 ] |
|
nice when possible i will test it |
| Comment by Sergey Vojtovich [ 2013-09-13 ] |
|
Pushed to 10.0-base, revision-id: svoj@mariadb.org-20130913161456-g6z5rgwoczfsvdrj |
| Comment by roberto spadim [ 2013-09-13 ] |
|
hi sergey patch read, just one point (considering that syntax is ok 4) the KILL QUERY_ID <non exists query id>, return a error something like "thread id not found", must be "query id not found" |
| Comment by Sergey Vojtovich [ 2013-09-13 ] |
|
Ehm, I was going to fix it, but missed somehow. Thanks for pointing it out. |
| Comment by roberto spadim [ 2013-09-13 ] |
|
|