diff options
author | serg@serg.mylan <> | 2004-08-18 19:57:55 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-08-18 19:57:55 +0200 |
commit | e1237cbc53355382e032f0e88f906d67edd1f597 (patch) | |
tree | 8ac7985dc9b6caddd1c2402ef8606e4a4cd85ada /sql/repl_failsafe.cc | |
parent | 7c69afaf15eda7d51b2254e71c7078aaab3aa0f3 (diff) | |
parent | 8ce92878a2c32785a5af86e9ffa27b4904d01694 (diff) | |
download | mariadb-git-e1237cbc53355382e032f0e88f906d67edd1f597.tar.gz |
manually merged
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r-- | sql/repl_failsafe.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 4feb24f06b2..d7b70fe122c 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -589,6 +589,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))) { @@ -596,11 +598,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) @@ -618,9 +620,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); |