mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
Bug#11745656 - KILL THREAD -> ERROR: "SERVER SHUTDOWN IN PROGRESS"
Description:
------------
There are 2 issues reported in the bug report,
1. One session running a "long" select, then, from the other
session, you kill that first one, while select is
running, and it receives that message "Server shutdown in
progress".
Reported Date: 02-Apr-2006
=> Looks like this isuse is already fixed in 2009 by the patch
pushed for bug28141.
2. Killing query which goes to filesort, logs error entries like:
120416 9:17:28 [ERROR] mysqld: Sort aborted: Server shutdown in
progress
120416 9:18:48 [ERROR] mysqld: Sort aborted: Server shutdown in
progress
120416 9:19:39 [ERROR] mysqld: Sort aborted: Server shutdown in
progress
Reported Date: 16-Apr-2012
=> This issue is introduced in 5.5+ versions. Fixing this issue
in this patch.
Analysis:
---------
In function "filesort()", on error we are logging error message.
To the error message, the message related THD::killed_errno is
also appeneded, if it is set.(THD::kill_errno value is obtained
by calling member function THD::killed_errno)
In the scenario mentioned in this bug report, when we kill the
connection, THD::kill_errno is set to the THD::KILL_CONNECTION.
Enum type THD::KILL_CONNECTION corressponds to value
ER_SERVER_SHUTDOWN. Because of this, "Server shutdown in ...." is
appended to the message logged.
Fix:
----
Modified code of "filesort()" function to append "KILL_QUERY"
status to error message when thread is killed and server
shutdown is not in progress.
This commit is contained in:
@@ -339,7 +339,10 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length,
|
||||
"%s: %s",
|
||||
MYF(ME_ERROR + ME_WAITTANG),
|
||||
ER_THD(thd, ER_FILSORT_ABORT),
|
||||
kill_errno ? ER(kill_errno) : thd->stmt_da->message());
|
||||
kill_errno ? ((kill_errno == THD::KILL_CONNECTION &&
|
||||
!shutdown_in_progress) ? ER(THD::KILL_QUERY) :
|
||||
ER(kill_errno)) :
|
||||
thd->stmt_da->message());
|
||||
|
||||
if (global_system_variables.log_warnings > 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user