summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-09-06 15:14:10 +0300
committermonty@mysql.com <>2004-09-06 15:14:10 +0300
commit31122efde725e9b472e467a7cb1807100b7e6b1e (patch)
treed9ef905036723648a1d354d0523ef8124e4dee76 /sql/repl_failsafe.cc
parent32594c99899edd6de0053609c087f04dc21fbbfd (diff)
parent5d71817c7049e9db5c22e1667a41f57cf558d8ed (diff)
downloadmariadb-git-31122efde725e9b472e467a7cb1807100b7e6b1e.tar.gz
Merge with 4.1
(Includes merge of arena code in 4.1 and 5.0)
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index bb70b793d3b..10ff5fa3596 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -590,6 +590,8 @@ pthread_handler_decl(handle_failsafe_rpl,arg)
THD *thd = new THD;
thd->thread_stack = (char*)&thd;
MYSQL* recovery_captain = 0;
+ const char* msg;
+
pthread_detach_this_thread();
if (init_failsafe_rpl_thread(thd) || !(recovery_captain=mysql_init(0)))
{
@@ -597,11 +599,11 @@ pthread_handler_decl(handle_failsafe_rpl,arg)
goto err;
}
pthread_mutex_lock(&LOCK_rpl_status);
+ msg= thd->enter_cond(&COND_rpl_status,
+ &LOCK_rpl_status, "Waiting for request");
while (!thd->killed && !abort_loop)
{
bool break_req_chain = 0;
- const char* msg = thd->enter_cond(&COND_rpl_status,
- &LOCK_rpl_status, "Waiting for request");
pthread_cond_wait(&COND_rpl_status, &LOCK_rpl_status);
thd->proc_info="Processing request";
while (!break_req_chain)
@@ -619,9 +621,8 @@ pthread_handler_decl(handle_failsafe_rpl,arg)
break;
}
}
- thd->exit_cond(msg);
}
- pthread_mutex_unlock(&LOCK_rpl_status);
+ thd->exit_cond(msg);
err:
if (recovery_captain)
mysql_close(recovery_captain);