summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-08-15 09:59:11 -0700
committerjimw@mysql.com <>2005-08-15 09:59:11 -0700
commitdf259289834ae591eba49c03c5fd11156b43af15 (patch)
treec24c4f75f76009267963816ddd748fde245ddba0 /sql/mysqld.cc
parente21a025c657da3fc3dcb414f2bd9e0b3fdbc353a (diff)
parentd6a8330e393a4668050150f2db3d80c6dcd448d0 (diff)
downloadmariadb-git-df259289834ae591eba49c03c5fd11156b43af15.tar.gz
Merge mysql.com:/home/jimw/my/mysql-4.1-11796
into mysql.com:/home/jimw/my/mysql-4.1-clean
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 9177703599c..b5a292fec28 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -649,7 +649,6 @@ static void close_connections(void)
}
#endif
end_thr_alarm(0); // Abort old alarms.
- end_slave();
/*
First signal all threads that it's time to die
@@ -665,6 +664,9 @@ static void close_connections(void)
{
DBUG_PRINT("quit",("Informing thread %ld that it's time to die",
tmp->thread_id));
+ /* We skip slave threads on this first loop through. */
+ if (tmp->slave_thread) continue;
+
tmp->killed= 1;
if (tmp->mysys_var)
{
@@ -681,6 +683,8 @@ static void close_connections(void)
}
(void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list
+ end_slave();
+
if (thread_count)
sleep(2); // Give threads time to die