summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 74a28c4724f..0a9adc5fa2c 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -2696,7 +2696,7 @@ void* start_wsrep_THD(void *arg)
WSREP_DEBUG("wsrep system thread %llu, %p starting",
thd->thread_id, thd);
- thd_args->fun()(thd, thd_args->args());
+ thd_args->fun()(thd, static_cast<void *>(thd_args));
WSREP_DEBUG("wsrep system thread: %llu, %p closing",
thd->thread_id, thd);
@@ -2707,8 +2707,6 @@ void* start_wsrep_THD(void *arg)
close_connection(thd, 0);
- delete thd_args;
-
mysql_mutex_lock(&LOCK_wsrep_slave_threads);
DBUG_ASSERT(wsrep_running_threads > 0);
wsrep_running_threads--;
@@ -2727,6 +2725,7 @@ void* start_wsrep_THD(void *arg)
break;
}
+ delete thd_args;
WSREP_DEBUG("wsrep running threads now: %lu", wsrep_running_threads);
mysql_cond_broadcast(&COND_wsrep_slave_threads);
mysql_mutex_unlock(&LOCK_wsrep_slave_threads);