summaryrefslogtreecommitdiff
path: root/sql/wsrep_thd.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-10-01 09:37:40 +0400
committerAlexander Barkov <bar@mariadb.com>2019-10-01 09:37:40 +0400
commit7e44c455f4de82081af5089e1f77378676aa45ff (patch)
tree380cccc03bda084e6a8e38fd7ff6b4304ca8324a /sql/wsrep_thd.cc
parent6c2724fc05d12904f8c2f58f8dbadd9523d18c96 (diff)
parentf203245e9edcfb202c1b23fba186be043ce6002d (diff)
downloadmariadb-git-7e44c455f4de82081af5089e1f77378676aa45ff.tar.gz
Merge remote-tracking branch 'origin/10.2' into 10.3
Diffstat (limited to 'sql/wsrep_thd.cc')
-rw-r--r--sql/wsrep_thd.cc26
1 files changed, 6 insertions, 20 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index 32fecda1eaa..e251df956c4 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -419,26 +419,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);
- key= 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