List:Internals« Previous MessageNext Message »
From:Jim Winstead Date:August 9 2005 3:05am
Subject:bk commit into 4.1 tree (jimw:1.2333) BUG#11796
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2333 05/08/08 18:05:27 jimw@stripped +1 -0
  Avoid problems on shutdown by shutting down replication slave threads
  after normal connection threads. (Bug #11796)

  sql/mysqld.cc
    1.583 05/08/08 18:05:24 jimw@stripped +5 -1
    Move call to end_slave() after first loop through killing threads,
    to minimize chances of 'SHOW SLAVE STATUS' being called between the
    time the slave is shut down and connections are shut down.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jimw
# Host:	rama.(none)
# Root:	/home/jimw/my/mysql-4.1-11796

--- 1.582/sql/mysqld.cc	2005-07-19 09:24:59 -07:00
+++ 1.583/sql/mysqld.cc	2005-08-08 18:05:24 -07:00
@@ -648,7 +648,6 @@
   }
 #endif
   end_thr_alarm(0);			 // Abort old alarms.
-  end_slave();
 
   /*
     First signal all threads that it's time to die
@@ -664,6 +663,9 @@
   {
     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)
     {
@@ -679,6 +681,8 @@
     }
   }
   (void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list
+
+  end_slave();
 
   if (thread_count)
     sleep(2);					// Give threads time to die
Thread
bk commit into 4.1 tree (jimw:1.2333) BUG#11796Jim Winstead9 Aug