summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2013-11-25 17:14:08 +0200
committerJan Lindström <jplindst@mariadb.org>2013-11-25 17:14:08 +0200
commit071edcfea05674f86926ee4c5fbf30f97c2ed368 (patch)
treec33fbb7c8bc5d568650226c8d71496a3d47bc10c /sql/slave.cc
parent4f85baab95f50448930a8c9915f7178aa121e66e (diff)
parent160236f880e92d2872d95ce72aab144f08456bcc (diff)
downloadmariadb-git-071edcfea05674f86926ee4c5fbf30f97c2ed368.tar.gz
Merge with MariaDB 5.5.34.
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc12
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
}