summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index ed01e1bb038..6b43c2f796e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -396,6 +396,11 @@ bool THD::store_globals()
return 1;
mysys_var=my_thread_var;
dbug_thread_id=my_thread_id();
+ /*
+ By default 'slave_proxy_id' is 'thread_id'. They may later become different
+ if this is the slave SQL thread.
+ */
+ slave_proxy_id= thread_id;
return 0;
}