summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-12 22:33:27 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-12 22:33:27 +0100
commit1b7a794b738ae889534ac37805ca6e0016af122a (patch)
tree0da0ed6ffaa52fefe40dc528301cdac5dfcb67ea
parent85416269c3880a4d9b22d2341055f40bd62aaa1a (diff)
downloadmariadb-git-bb-10.2-vcols.tar.gz
MDEV-11540 Unexpected system threads in the process listbb-10.2-vcols
name innodb background threads as such
-rw-r--r--sql/sql_class.cc2
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 343511d665c..1b6692d9d2c 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -796,6 +796,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
mysql_audit_init_thd(this);
net.vio=0;
net.buff= 0;
+ net.reading_or_writing= 0;
client_capabilities= 0; // minimalistic client
system_thread= NON_SYSTEM_THREAD;
cleanup_done= free_connection_done= abort_on_warning= 0;
@@ -4448,6 +4449,7 @@ MYSQL_THD create_thd()
thd->store_globals();
thd->set_command(COM_DAEMON);
thd->system_thread= SYSTEM_THREAD_GENERIC;
+ thd->security_ctx->host_or_ip="";
add_to_active_threads(thd);
return thd;
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index d3745122959..cac438c71d8 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -329,6 +329,7 @@ thd_destructor_proxy(void *)
thd_destructor_myvar = _my_thread_var();
THD *thd= create_thd();
+ thd_proc_info(thd, "InnoDB background thread");
mysql_mutex_lock(&thd_destructor_mutex);
thd_destructor_myvar->current_mutex = &thd_destructor_mutex;
@@ -1779,6 +1780,7 @@ innobase_create_background_thd()
/*============================*/
{
MYSQL_THD thd= create_thd();
+ thd_proc_info(thd, "InnoDB background thread");
THDVAR(thd, background_thread) = true;
return thd;
}