diff options
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r-- | sql/wsrep_thd.cc | 21 |
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 |