diff options
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index 16a85024bb1..4664db3ac64 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -711,6 +711,7 @@ int start_slave_thread( { pthread_t th; ulong start_id; + int error; DBUG_ENTER("start_slave_thread"); DBUG_ASSERT(mi->inited); @@ -737,9 +738,10 @@ int start_slave_thread( } start_id= *slave_run_id; DBUG_PRINT("info",("Creating new slave thread")); - if (mysql_thread_create(thread_key, - &th, &connection_attrib, h_func, (void*)mi)) + if ((error = mysql_thread_create(thread_key, + &th, &connection_attrib, h_func, (void*)mi))) { + sql_print_error("Can't create slave thread (errno= %d).", error); if (start_lock) mysql_mutex_unlock(start_lock); DBUG_RETURN(ER_SLAVE_THREAD); @@ -3380,6 +3382,9 @@ err_during_init: DBUG_LEAVE; // Must match DBUG_ENTER() my_thread_end(); +#ifdef HAVE_OPENSSL + ERR_remove_state(0); +#endif pthread_exit(0); return 0; // Avoid compiler warnings } @@ -3790,6 +3795,9 @@ err_during_init: DBUG_LEAVE; // Must match DBUG_ENTER() my_thread_end(); +#ifdef HAVE_OPENSSL + ERR_remove_state(0); +#endif pthread_exit(0); return 0; // Avoid compiler warnings } |