Below is the list of changes that have just been committed into a local
5.0 repository of ramil. When ramil 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@stripped, 2008-02-27 16:40:28+04:00, ramil@stripped +1 -0
Fix for bug #31024: STOP SLAVE does not stop attempted connect()s
Problem: if the IO slave thread is attempting to connect,
STOP SLAVE waits for the attempt to finish.
It might take too long.
Fix: don't wait, stop the slave immediately.
sql/sql_repl.h@stripped, 2008-02-27 16:40:26+04:00, ramil@stripped +1 -0
Fix for bug #31024: STOP SLAVE does not stop attempted connect()s
- send a singnal to the (connecting) slave IO thread in a loop,
breaking current socket(), connect(), poll() etc. calls,
that makes further thd->awake() call effective.
diff -Nrup a/sql/sql_repl.h b/sql/sql_repl.h
--- a/sql/sql_repl.h 2006-12-31 00:02:07 +04:00
+++ b/sql/sql_repl.h 2008-02-27 16:40:26 +04:00
@@ -37,6 +37,7 @@ extern my_bool opt_sporadic_binlog_dump_
#define KICK_SLAVE(thd) do { \
pthread_mutex_lock(&(thd)->LOCK_delete); \
+ pthread_kill(thd->real_id, thr_client_alarm); \
(thd)->awake(THD::NOT_KILLED); \
pthread_mutex_unlock(&(thd)->LOCK_delete); \
} while(0)