Bug #43805 Server "stops" SLEEP command after KILL
Submitted: 23 Mar 2009 15:13 Modified: 23 Mar 2009 15:44
Reporter: Tonci Grgin Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: C API (client library) Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[23 Mar 2009 15:13] Tonci Grgin
Description:
Following on Bug#43760 and Bug#43761 I noticed strange behavior so asked Sveta to check.

How to repeat:
=========
1. Start two instances ("A" and "B") of the mysql cli.
2. As a preparation, in cli B, do a "show processlist" and find the cli A connection id.
3. In cli A, perform a query that takes a long time - for example (expand as necessary):
SELECT * FROM mysql.user a, mysql.user b, mysql.user c, mysql.user d, mysql.user e,
mysql.user f, mysql.user g, mysql.user h;
4. In cli B, kill the query before it finishes with KILL QUERY <...>.
5. Notice the output.
6. Try another query, this time using SLEEP (as in the Connector/NET example):
SELECT SLEEP(600); TRUNCATE TABLE test.test;
7. Kill the query again from B.
8. Notice the output.
=========
[23 Mar 2009 15:44] Sveta Smirnova
Thank you for the report.

This is really not a bug, because in second case:

1. A executes select sleep(600);
2. B kills select sleep(600);
3. A reconnects
4. A executes second query