From 2ea16b995de01f1f5347abee8a050c26eaef55ec Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Mon, 8 Jun 2015 21:06:22 +0300 Subject: [PATCH] This commit fixes - errno handling in wsp::env::append() method, where error could be returned by mistake - return code of sst_prepare_other() when pthread_create() fails - it was returning positive error code which by convention is treated as success. --- sql/wsrep_utils.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index b6b50ae7443..719e8e6b473 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -165,10 +165,9 @@ env::append(const char* val) ++len_; env_[len_] = NULL; } + else errno_ = errno; } - - /* if either realloc() or strdup() failed, errno had been set */ - errno_ = errno; + else errno_ = errno; return errno_; }