1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Avoid problems on shutdown by shutting down replication slave threads

after normal connection threads. (Bug #11796)
This commit is contained in:
jimw@mysql.com
2005-08-08 18:05:27 -07:00
parent ac6623f08f
commit d6a8330e39

View File

@@ -648,7 +648,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
@@ -664,6 +663,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)
{
@@ -680,6 +682,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