Bug #36230 killing a statement in "statistics" mode returns "unknown error" exception
Submitted: 21 Apr 2008 16:01 Modified: 9 Sep 2008 5:49
Reporter: R. Jäschke Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.0.51a OS:Linux
Assigned to: CPU Architecture:Any
Tags: exception, KILL, statistics

[21 Apr 2008 16:01] R. Jäschke
Description:
When I kill a statement which has state "statistics" (e.g., shown with "show processlist"), I get a 

ERROR 1105 (HY000): Unknown error

exception. Instead, I would expect to get a 

ERROR 1317 SQLSTATE: 70100  (ER_QUERY_INTERRUPTED)

exception. Hence, the wrong exception is thrown, or there must be another error. 

How to repeat:
Create a statement which is longer in state "statistics" and while it is n that state, call "show processlist". Pick the statements ID and kill it with "kill". The statement is then aborted with the above error.

Suggested fix:
Throw the correct exception - in general, never throw "unknown error" exceptions, because it's impossible to find the error then.
[21 Apr 2008 16:30] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 5.0.51a. In case of the same problem, please, send a complete, repeatable test case.
[21 May 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[30 May 2008 11:53] R. Jäschke
I tried it with the newest version of MySQL:

Server version: 5.0.51a-3ubuntu5-log (Ubuntu)

There I get this error:

ERROR 1053 (08S01): Server shutdown in progress

Which is better, but not optimal.

I am not able to provide example tables/data because getting a statement into "statistics" mode occurs typically in a complex database with a lot of data. The statement which repeatably goes into statistics mode contains twelve self-joins.
[9 Aug 2008 5:49] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.0.67, and inform about the results.
[9 Sep 2008 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".