summaryrefslogtreecommitdiff
path: root/sql/mysqld.h
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2017-02-28 15:23:44 +0400
committerSergey Vojtovich <svoj@mariadb.org>2017-03-01 11:35:24 +0400
commite9ad4bdb4252e0a4a3799364e9a27c3865a19df1 (patch)
tree200cdb1400a5506eccf43bc27d1057f36a47e8fb /sql/mysqld.h
parentcc413ce9a368b930aba5e63c0ab013f7b3ab3c04 (diff)
downloadmariadb-git-e9ad4bdb4252e0a4a3799364e9a27c3865a19df1.tar.gz
MDEV-11221 - main.events_restart failed in bb
Applied lost in a merge revision 7f38a07: MDEV-10043 - main.events_restart fails sporadically in buildbot (crashes upon shutdown) There was race condition between shutdown thread and event worker threads. Shutdown thread waits for thread_count to become 0 in close_connections(). It may happen so that event worker thread was started but didn't increment thread_count by this time. In this case shutdown thread may miss wait for this working thread and continue deinitialization. Worker thread in turn may continue execution and crash on deinitialized data. Fixed by incrementing thread_count before thread is actually created like it is done for connection threads. Also let event scheduler not to inc/dec running threads counter for symmetry with other "service" threads.
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r--sql/mysqld.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h
index 4538b7c4c70..28ac871d858 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -59,7 +59,6 @@ void kill_mysql(void);
void close_connection(THD *thd, uint sql_errno= 0);
void handle_connection_in_main_thread(THD *thd);
void create_thread_to_handle_connection(THD *thd);
-void delete_running_thd(THD *thd);
void signal_thd_deleted();
void unlink_thd(THD *thd);
bool one_thread_per_connection_end(THD *thd, bool put_in_cache);