summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-06-11 17:13:03 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-06-11 17:13:03 -0400
commit85032e36c66820c851b63b5189bc397404af51c7 (patch)
tree573dcba43c134b41d1e0c7567a32cf4d0c199851 /sql/mysqld.cc
parentadc6bd15d575a10c826aa4e752456ef9924db5ec (diff)
downloadmariadb-git-85032e36c66820c851b63b5189bc397404af51c7.tar.gz
Modified patch for lp:1310875.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 6d9c9eb0b7a..c008be9d5d3 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2757,11 +2757,15 @@ static bool cache_thread()
bool one_thread_per_connection_end(THD *thd, bool put_in_cache)
{
DBUG_ENTER("one_thread_per_connection_end");
+#ifdef WITH_WSREP
+ const bool wsrep_applier(thd->wsrep_applier);
+#endif /* WITH_WSREP */
+
unlink_thd(thd);
/* Mark that current_thd is not valid anymore */
my_pthread_setspecific_ptr(THR_THD, 0);
+
#ifdef WITH_WSREP
- const bool wsrep_applier(thd->wsrep_applier);
if (put_in_cache && !wsrep_applier)
#else
if (put_in_cache)