diff options
author | Michael Widenius <monty@askmonty.org> | 2011-09-10 18:01:27 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-09-10 18:01:27 +0300 |
commit | 3fb22ac5e146e1fe34d282c3c3ef6bd50af90ca5 (patch) | |
tree | 4f069ae5398a3e17417f942cb6926c66efe968a6 /sql/sql_class.cc | |
parent | 3769841d9e706ee018d5273d2901954b9a281c3e (diff) | |
parent | 0db9c26b05439f9d6fc29234966f50d8e393dfe2 (diff) | |
download | mariadb-git-3fb22ac5e146e1fe34d282c3c3ef6bd50af90ca5.tar.gz |
Merge with 5.2
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 6344ac45574..16165cdedbb 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1273,6 +1273,15 @@ void THD::awake(THD::killed_state state_to_set) THD_CHECK_SENTRY(this); safe_mutex_assert_owner(&LOCK_thd_data); + if (global_system_variables.log_warnings > 3) + { + Security_context *sctx= security_ctx; + sql_print_warning(ER(ER_NEW_ABORTING_CONNECTION), + thread_id,(db ? db : "unconnected"), + sctx->user ? sctx->user : "unauthenticated", + sctx->host_or_ip, + "KILLED"); + } killed= state_to_set; if (state_to_set != THD::KILL_QUERY) { @@ -3392,7 +3401,10 @@ void THD::restore_backup_open_tables_state(Open_tables_state *backup) extern "C" int thd_killed(const MYSQL_THD thd) { - return(thd->killed); + if (thd->killed == THD::NOT_KILLED || thd->killed == THD::KILL_BAD_DATA || + thd->killed == THD::KILL_SYSTEM_THREAD) + return 0; + return thd->killed; } |