summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorunknown <malff@lambda.hsd1.co.comcast.net.>2007-11-21 18:42:15 -0700
committerunknown <malff@lambda.hsd1.co.comcast.net.>2007-11-21 18:42:15 -0700
commit01900080958d8209617d76d3c5f770008c7c94ff (patch)
treecfe5c0cef42967073e6d1cbac8f6bc991979ecbe /sql/sql_class.cc
parent1fb0a096cf9ca930fe9bc66b202c8662daa76a9a (diff)
parentadd444a4a3acae1e038a3dd9f8dbe1e4ec6d549e (diff)
downloadmariadb-git-01900080958d8209617d76d3c5f770008c7c94ff.tar.gz
Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge mysql-test/r/events_bugs.result: Auto merged mysql-test/t/information_schema.test: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index bf8413e8627..f59a848a242 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -678,9 +678,7 @@ void THD::cleanup(void)
lock=locked_tables; locked_tables=0;
close_thread_tables(this);
}
- mysql_ha_flush(this, (TABLE_LIST*) 0,
- MYSQL_HA_CLOSE_FINAL | MYSQL_HA_FLUSH_ALL, FALSE);
- hash_free(&handler_tables_hash);
+ mysql_ha_cleanup(this);
delete_dynamic(&user_var_events);
hash_free(&user_vars);
close_temporary_tables(this);
@@ -818,7 +816,20 @@ void THD::awake(THD::killed_state state_to_set)
if (!slave_thread)
thread_scheduler.post_kill_notification(this);
#ifdef SIGNAL_WITH_VIO_CLOSE
- close_active_vio();
+ if (this != current_thd)
+ {
+ /*
+ In addition to a signal, let's close the socket of the thread that
+ is being killed. This is to make sure it does not block if the
+ signal is lost. This needs to be done only on platforms where
+ signals are not a reliable interruption mechanism.
+
+ If we're killing ourselves, we know that we're not blocked, so this
+ hack is not used.
+ */
+
+ close_active_vio();
+ }
#endif
}
if (mysys_var)