summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-09-09 19:44:07 +0300
committerMichael Widenius <monty@askmonty.org>2011-09-09 19:44:07 +0300
commit8fb10c24d74cbddbfd6da0b5f4ea9409f8f88e57 (patch)
tree9aa9507d3be693856005e7718dd6742d160e0bf5 /sql/sql_show.cc
parent13e4d54795c2e49e4a8654964de1ab899eae2b23 (diff)
downloadmariadb-git-8fb10c24d74cbddbfd6da0b5f4ea9409f8f88e57.tar.gz
Fixed that automatic killing of delayed insert thread (in flush, alter table etc) will not abort auto-repair of MyISAM table.
Give more information when finding an error in a MyISAM table. When killing system thread, use KILL_SYSTEM_THREAD instead of KILL_CONNECTION to make it easier to ignore the signal in sensitive context (like auto-repair) Added new kill level: KILL_SERVER that will in the future to be used to signal killed by shutdown. Add more warnings about killed connections when warning level > 3 include/myisamchk.h: Added counting of printed info/notes mysys/mf_iocache.c: Remove duplicate assignment sql/handler.cc: Added test of KILL_SERVER sql/log.cc: Ignore new 'kill' error ER_NEW_ABORTING_CONNECTION when requesting query error code. sql/mysqld.cc: Add more warnings for killed connections when warning level > 3 sql/scheduler.cc: Added checks for new kill signals sql/slave.cc: Ignore new kill signal ER_NEW_ABORTING_CONNECTION sql/sp_head.cc: Fixed assignment to bool Added testing of new kill signals sql/sql_base.cc: Use KILL_SYSTEM_THREAD to auto-kill system threads sql/sql_class.cc: Add more warnings for killed connections when warning level > 3 thd_killed() now ignores KILL_BAD_DATA and THD::KILL_SYSTEM_THREAD as these should not abort sensitive operations. sql/sql_class.h: Added KILL_SYSTEM_THREAD and KILL_SERVER sql/sql_connect.cc: Added handling of KILL_SERVER sql/sql_insert.cc: Use KILL_SYSTEM_THREAD to auto-kill system threads Added handling of KILL_SERVER sql/sql_parse.cc: Add more warnings for killed connections when warning level > 3 Added checking that thd->abort_on_warning is reset at end of query. sql/sql_show.cc: Update condition for when a query is 'killed' storage/myisam/ha_myisam.cc: Added counting of info/notes printed storage/myisam/mi_check.c: Always print an an error if we find data errors when checking/repairing a MyISAM table. When a repair was killed, don't retry repair. Added assert if sort_get_next_record() returned an error without an error message. Removed nonsence check "if (sort_param->read_cache.error < 0)" in repair. storage/myisam/myisamchk.c: Added counting of notes printed storage/pbxt/src/thread_xt.cc: Better error message.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index e10488cb87c..0c422632f35 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1935,7 +1935,9 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
pthread_mutex_lock(&tmp->LOCK_thd_data);
if ((mysys_var= tmp->mysys_var))
pthread_mutex_lock(&mysys_var->mutex);
- thd_info->proc_info= (char*) (tmp->killed == THD::KILL_CONNECTION? "Killed" : 0);
+ thd_info->proc_info= (char*) (tmp->killed != THD::NOT_KILLED &&
+ tmp->killed != THD::KILL_BAD_DATA ?
+ "Killed" : 0);
#ifndef EMBEDDED_LIBRARY
thd_info->state_info= (char*) (tmp->locked ? "Locked" :
tmp->net.reading_or_writing ?
@@ -2053,7 +2055,9 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
if ((mysys_var= tmp->mysys_var))
pthread_mutex_lock(&mysys_var->mutex);
/* COMMAND */
- if ((val= (char *) (tmp->killed == THD::KILL_CONNECTION? "Killed" : 0)))
+ if ((val= (char *) ((tmp->killed != THD::NOT_KILLED &&
+ tmp->killed != THD::KILL_BAD_DATA ?
+ "Killed" : 0))))
table->field[4]->store(val, strlen(val), cs);
else
table->field[4]->store(command_name[tmp->command].str,