diff options
-rw-r--r-- | sql/wsrep_sst.cc | 4 | ||||
-rw-r--r-- | sql/wsrep_utils.cc | 7 | ||||
-rw-r--r-- | sql/wsrep_utils.h | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 5e1a4973c2a..dd6f169eb48 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -1,4 +1,4 @@ -/* Copyright 2008-2012 Codership Oy <http://www.codership.com> +/* Copyright 2008-2015 Codership Oy <http://www.codership.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -485,7 +485,7 @@ static ssize_t sst_prepare_other (const char* method, { WSREP_ERROR("sst_prepare_other(): pthread_create() failed: %d (%s)", ret, strerror(ret)); - return ret; + return -ret; } mysql_cond_wait (&arg.cond, &arg.lock); diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index 13a3b4a7438..951007c2660 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -1,4 +1,4 @@ -/* Copyright 2010 Codership Oy <http://www.codership.com> +/* Copyright 2010-2015 Codership Oy <http://www.codership.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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_; } diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h index c43febf249a..7d864603c7f 100644 --- a/sql/wsrep_utils.h +++ b/sql/wsrep_utils.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2013 Codership Oy <info@codership.com> +/* Copyright (C) 2013-2015 Codership Oy <info@codership.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by |