diff options
author | unknown <monty@mashka.mysql.fi> | 2003-03-12 01:40:06 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-03-12 01:40:06 +0200 |
commit | fa4f6e89984fd26199f18d4bf5c418b054536ad0 (patch) | |
tree | 1aab264467488d6957c97d78cd61ef06b90ef736 /sql/slave.cc | |
parent | 6361cd89fce087510a8addd4ce0523771526d2c8 (diff) | |
download | mariadb-git-fa4f6e89984fd26199f18d4bf5c418b054536ad0.tar.gz |
Simple fixes (nothing notable)
dbug/dbug.c:
Remove duplicate va_end() call
mysql-test/mysql-test-run.sh:
Longer stack trace from valgrind
mysys/my_lib.c:
Fixed wrong dbug printf
sql/slave.cc:
Simple optimization
sql/sql_class.cc:
Added DBUG info
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index daca8fe1cf6..5ddea7501e4 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -401,9 +401,9 @@ int terminate_slave_threads(MASTER_INFO* mi,int thread_mask,bool skip_lock) DBUG_PRINT("info",("Terminating IO thread")); mi->abort_slave=1; if ((error=terminate_slave_thread(mi->io_thd,io_lock, - io_cond_lock, - &mi->stop_cond, - &mi->slave_running)) && + io_cond_lock, + &mi->stop_cond, + &mi->slave_running)) && !force_all) DBUG_RETURN(error); } @@ -443,12 +443,10 @@ int terminate_slave_thread(THD* thd, pthread_mutex_t* term_lock, be referening freed memory trying to kick it */ THD_CHECK_SENTRY(thd); - if (*slave_running) + + while (*slave_running) // Should always be true { KICK_SLAVE(thd); - } - while (*slave_running) - { /* There is a small chance that slave thread might miss the first alarm. To protect againts it, resend the signal until it reacts @@ -456,10 +454,6 @@ int terminate_slave_thread(THD* thd, pthread_mutex_t* term_lock, struct timespec abstime; set_timespec(abstime,2); pthread_cond_timedwait(term_cond, cond_lock, &abstime); - if (*slave_running) - { - KICK_SLAVE(thd); - } } if (term_lock) pthread_mutex_unlock(term_lock); |