summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2004-05-14 16:48:56 +0300
committerheikki@hundin.mysql.fi <>2004-05-14 16:48:56 +0300
commit02f51ccf2d16bd3525e1446553ab74c00af695f1 (patch)
treeb754d8cebf93bbb70cb8401e05e31ea14aeecf85 /sql/slave.cc
parentb4ae2577f03888995cb5a78a4bd532d0272349f6 (diff)
downloadmariadb-git-02f51ccf2d16bd3525e1446553ab74c00af695f1.tar.gz
Many files:
Fix remaining cases of Bug #3596: fix possible races caused by an obsolete value of thd->query_length in SHOW PROCESSLIST and SHOW INNODB STATUS; this fix depends on the fact that thd->query is always set to NULL before setting it to point to a new query
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index d6d0a5b5425..c7a7dac141a 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2691,6 +2691,7 @@ err:
IO_RPL_LOG_NAME, llstr(mi->master_log_pos,llbuff));
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->query = thd->db = 0; // extra safety
+ thd->query_length = 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
if (mysql)
{
@@ -2839,6 +2840,7 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
err:
VOID(pthread_mutex_lock(&LOCK_thread_count));
thd->query = thd->db = 0; // extra safety
+ thd->query_length = 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
thd->proc_info = "Waiting for slave mutex on exit";
pthread_mutex_lock(&rli->run_lock);