summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorunknown <grog@eucla.lemis.com>2006-07-07 17:18:52 +0930
committerunknown <grog@eucla.lemis.com>2006-07-07 17:18:52 +0930
commit870f324a7681ddfc573b710bac7fcf3bb105749a (patch)
tree3a085738209bbd3086b4a2b05faf0011661dbfa1 /sql/slave.cc
parent676b626f04f06520fc3465efb0f1dc2926fdad49 (diff)
downloadmariadb-git-870f324a7681ddfc573b710bac7fcf3bb105749a.tar.gz
slave.cc:
BUG#20850: Assert during slave shutdown in many rpl_* tests. This was caused by a race condition at the end of handle_slave_io which under some circumstances allowed the cleanup to proceed before the thread had completed. sql/slave.cc: BUG#20850: Assert during slave shutdown in many rpl_* tests. This was caused by a race condition at the end of handle_slave_io which under some circumstances allowed the cleanup to proceed before the thread had completed.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 0ac4cda7b3b..8f6ce6d580d 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3533,15 +3533,12 @@ err:
write_ignored_events_info_to_relay_log(thd, mi);
thd->proc_info = "Waiting for slave mutex on exit";
pthread_mutex_lock(&mi->run_lock);
- mi->slave_running = 0;
- mi->io_thd = 0;
/* Forget the relay log's format */
delete mi->rli.relay_log.description_event_for_queue;
mi->rli.relay_log.description_event_for_queue= 0;
// TODO: make rpl_status part of MASTER_INFO
change_rpl_status(RPL_ACTIVE_SLAVE,RPL_IDLE_SLAVE);
- mi->abort_slave = 0; // TODO: check if this is needed
DBUG_ASSERT(thd->net.buff != 0);
net_end(&thd->net); // destructor will not free it, because net.vio is 0
close_thread_tables(thd, 0);
@@ -3552,6 +3549,9 @@ err:
pthread_cond_broadcast(&mi->stop_cond); // tell the world we are done
pthread_mutex_unlock(&mi->run_lock);
my_thread_end();
+ mi->abort_slave = 0;
+ mi->slave_running = 0;
+ mi->io_thd = 0;
pthread_exit(0);
DBUG_RETURN(0); // Can't return anything here
}