mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#28141: Control C on query waiting on lock causes ERROR 1053 (server shutdown)
If a thread is killed in the server, we throw "shutdown" only if one is actually in progress; otherwise, we throw "query interrupted". Control-C in the mysql command-line client is "incremental" now. First Control-C sends KILL QUERY (when connected to 5.0+ server, otherwise, see next) Next Control-C sends KILL CONNECTION Next Control-C aborts client. As the first two steps only pertain to an existing query, Control-C will abort the client right away if no query is running. client will give more detailed/consistent feedback on Control-C now.
This commit is contained in:
@@ -44,6 +44,8 @@ extern char internal_table_name[2];
|
||||
extern char empty_c_string[1];
|
||||
extern const char **errmesg;
|
||||
|
||||
extern bool volatile shutdown_in_progress;
|
||||
|
||||
#define TC_LOG_PAGE_SIZE 8192
|
||||
#define TC_LOG_MIN_SIZE (3*TC_LOG_PAGE_SIZE)
|
||||
|
||||
@@ -1801,7 +1803,11 @@ public:
|
||||
{
|
||||
int err= killed_errno();
|
||||
if (err)
|
||||
{
|
||||
if ((err == KILL_CONNECTION) && !shutdown_in_progress)
|
||||
err = KILL_QUERY;
|
||||
my_message(err, ER(err), MYF(0));
|
||||
}
|
||||
}
|
||||
/* return TRUE if we will abort query if we make a warning now */
|
||||
inline bool really_abort_on_warning()
|
||||
|
||||
Reference in New Issue
Block a user