List:Internals« Previous MessageNext Message »
From:sasha Date:November 23 2001 4:57pm
Subject:bk commit into 3.23 tree
View as plain text  
Below is the list of changes that have just been commited into a local
3.23. repository of sasha. When sasha does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet@stripped, 2001-11-23 09:57:36-07:00, sasha@stripped
  properly kill slave in all cases on systems that do not interrupt syscalls
  on a signal

  sql/sql_repl.cc
    1.44 01/11/23 09:57:35 sasha@stripped +4 -7
    properly kill slave in all cases on systems that do not interrupt syscalls
    on a signal

  sql/sql_repl.h
    1.7 01/11/23 09:57:35 sasha@stripped +7 -0
    properly kill slave in all cases on systems that do not interrupt syscalls
    on a signal

# 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:	sasha
# Host:	mysql.sashanet.com
# Root:	/home/sasha/src/bk/mysql

--- 1.43/sql/sql_repl.cc	Sat Sep  1 01:38:15 2001
+++ 1.44/sql/sql_repl.cc	Fri Nov 23 09:57:35 2001
@@ -602,16 +602,13 @@
   if (slave_running)
   {
     abort_slave = 1;
-    thr_alarm_kill(slave_real_id);
-#ifdef SIGNAL_WITH_VIO_CLOSE
-    slave_thd->close_active_vio();
-#endif    
+    KICK_SLAVE;
     // do not abort the slave in the middle of a query, so we do not set
     // thd->killed for the slave thread
     thd->proc_info = "waiting for slave to die";
     while(slave_running)
     {
-      /* there is a small change that slave thread might miss the first
+      /* there is a small chance that slave thread might miss the first
 	 alarm. To protect againts it, resend the signal until it reacts
       */
 	 
@@ -630,7 +627,7 @@
 #endif
       pthread_cond_timedwait(&COND_slave_stopped, &LOCK_slave, &abstime);
       if (slave_running)
-        thr_alarm_kill(slave_real_id);
+        KICK_SLAVE;
     }
   }
   else
@@ -716,7 +713,7 @@
   if((slave_was_running = slave_running))
     {
       abort_slave = 1;
-      thr_alarm_kill(slave_real_id);
+      KICK_SLAVE;
       thd->proc_info = "waiting for slave to die";
       while(slave_running)
        pthread_cond_wait(&COND_slave_stopped, &LOCK_slave); // wait until done

--- 1.6/sql/sql_repl.h	Thu Jun 28 18:22:27 2001
+++ 1.7/sql/sql_repl.h	Fri Nov 23 09:57:35 2001
@@ -14,6 +14,13 @@
 extern bool opt_sporadic_binlog_dump_fail;
 #endif
 
+#ifdef SIGNAL_WITH_VIO_CLOSE
+#define KICK_SLAVE { slave_thd->close_active_vio(); \
+  thr_alarm_kill(slave_real_id); }
+#else
+#define KICK_SLAVE thr_alarm_kill(slave_real_id);
+#endif
+
 File open_binlog(IO_CACHE *log, const char *log_file_name,
 	      const char **errmsg);
 
Thread
bk commit into 3.23 treesasha23 Nov