summaryrefslogtreecommitdiff
path: root/sql/wsrep_thd.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-08-13 19:28:51 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-08-13 19:28:51 +0300
commit65d48b4a7bd7a57a27f2e9ca54473e1ae86223b5 (patch)
treef145a7a095011fbc4e6661e1675f72f6cdca38b6 /sql/wsrep_thd.cc
parenteedd6179c1e5e8651270b353a693887179ad7bf3 (diff)
parented4ccf34a6603bd2374a721a7e1ad88472f335fc (diff)
downloadmariadb-git-65d48b4a7bd7a57a27f2e9ca54473e1ae86223b5.tar.gz
Merge 10.2 to 10.3
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r--sql/wsrep_thd.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 34b39c6d1e3..a45828beab3 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -417,9 +417,26 @@ static void wsrep_replication_process(THD *thd)
static bool create_wsrep_THD(wsrep_thread_args* args)
{
- ulong old_wsrep_running_threads= wsrep_running_threads;
mysql_mutex_lock(&LOCK_thread_count);
- bool res= pthread_create(&args->thread_id, &connection_attrib, start_wsrep_THD,
+ ulong old_wsrep_running_threads= wsrep_running_threads;
+#ifdef HAVE_PSI_THREAD_INTERFACE
+ PSI_thread_key key;
+
+ switch (args->thread_type)
+ {
+ case WSREP_APPLIER_THREAD:
+ key= key_wsrep_applier;
+ break;
+ case WSREP_ROLLBACKER_THREAD:
+ key= key_wsrep_rollbacker;
+ break;
+ default:
+ assert(0);
+ break;
+ }
+#endif
+
+ bool res= mysql_thread_create(key, &args->thread_id, &connection_attrib, start_wsrep_THD,
(void*)args);
/*
if starting a thread on server startup, wait until the this thread's THD