summaryrefslogtreecommitdiff
path: root/sql/wsrep_utils.cc
diff options
context:
space:
mode:
authorAlexey Yurchenko <ayurchen@gmail.com>2015-06-08 21:06:22 +0300
committerNirbhay Choubey <nirbhay@mariadb.com>2015-09-09 17:03:31 -0400
commitd809fcc3011c8fa8cfd62aa6232f45469a829611 (patch)
tree32aa77aca82e28f2f08a38b4e7b5d271f44eb25b /sql/wsrep_utils.cc
parent1b1410c449c651739590dba3d61ea5494c149ed3 (diff)
downloadmariadb-git-d809fcc3011c8fa8cfd62aa6232f45469a829611.tar.gz
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.
Diffstat (limited to 'sql/wsrep_utils.cc')
-rw-r--r--sql/wsrep_utils.cc7
1 files changed, 3 insertions, 4 deletions
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_;
}