diff options
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r-- | sql/wsrep_thd.cc | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index da90faa74cf..413d7f97214 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -420,25 +420,12 @@ static bool create_wsrep_THD(wsrep_thread_args* args) { mysql_mutex_lock(&LOCK_thread_count); 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); + DBUG_ASSERT(args->thread_type == WSREP_APPLIER_THREAD || + args->thread_type == WSREP_ROLLBACKER_THREAD); + bool res= mysql_thread_create(args->thread_type == WSREP_APPLIER_THREAD + ? key_wsrep_applier : key_wsrep_rollbacker, + &args->thread_id, &connection_attrib, + start_wsrep_THD, (void*)args); /* if starting a thread on server startup, wait until the this thread's THD is fully initialized (otherwise a THD initialization code might |