Below is the list of changes that have just been committed into a local
5.0 repository of rafal. When rafal 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, 2006-11-29 09:13:59+01:00, rafal@quant.(none) +1 -0
slave.cc:
cleaning-up the tree.
sql/slave.cc@stripped, 2006-11-29 09:05:02+01:00, rafal@quant.(none) +7 -4
cleaning-up the tree.
# 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: rafal
# Host: quant.(none)
# Root: /ext/mysql/bk/mysql-5.0-bug24507
--- 1.285/sql/slave.cc 2006-11-29 09:14:03 +01:00
+++ 1.286/sql/slave.cc 2006-11-29 09:14:03 +01:00
@@ -749,9 +749,14 @@
}
start_id= *slave_run_id;
DBUG_PRINT("info",("Creating new slave thread"));
+
+ pthread_attr_t attr= connection_attrib;
+ // threads should be joinable by default, but to be on the safe side...
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
if (high_priority)
- my_pthread_attr_setprio(&connection_attrib,CONNECT_PRIOR);
- if (pthread_create(&th, &connection_attrib, h_func, (void*)mi))
+ my_pthread_attr_setprio(&attr,CONNECT_PRIOR);
+
+ if (pthread_create(&th, &attr, h_func, (void*)mi))
{
if (start_lock)
pthread_mutex_unlock(start_lock);
@@ -3464,7 +3469,6 @@
thd= new THD; // note that contructor of THD uses DBUG_ !
THD_CHECK_SENTRY(thd);
- // pthread_detach_this_thread(); // do not deteach as we want to join later
thd->thread_stack= (char*) &thd; // remember where our stack is
if (init_slave_thread(thd, SLAVE_THD_IO))
{
@@ -3810,7 +3814,6 @@
/* Inform waiting threads that slave has started */
rli->slave_run_id++;
- // pthread_detach_this_thread(); // do not deteach since we are going to join with
this thread
if (init_slave_thread(thd, SLAVE_THD_SQL))
{
/*
| Thread |
|---|
| • bk commit into 5.0 tree (rafal:1.2311) | rsomla | 29 Nov |