[Commits] 9a1c4e9: MDEV-10056: SST method mysqldump is broken

Nirbhay Choubey nirbhay at mariadb.com
Tue May 17 20:28:52 EEST 2016


revision-id: 9a1c4e900b98fdb9940aab57c895753f175c2bd8 (mariadb-10.1.14-3-g9a1c4e9)
parent(s): 8d428630c0aa46eb73fed4197e35b5296b0583b2
author: Nirbhay Choubey
committer: Nirbhay Choubey
timestamp: 2016-05-17 13:28:48 -0400
message:

MDEV-10056: SST method mysqldump is broken

errno must be reset before strtol()/strtoll() functions
are invoked.

---
 sql/wsrep_sst.cc  | 1 +
 sql/wsrep_utils.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 4f6cc51..c2a1ab5 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -340,6 +340,7 @@ static int sst_scan_uuid_seqno (const char* str,
                                 wsrep_uuid_t* uuid, wsrep_seqno_t* seqno)
 {
   int offt = wsrep_uuid_scan (str, strlen(str), uuid);
+  errno= 0;                                     /* Reset the errno */
   if (offt > 0 && strlen(str) > (unsigned int)offt && ':' == str[offt])
   {
     *seqno = strtoll (str + offt + 1, NULL, 10);
diff --git a/sql/wsrep_utils.h b/sql/wsrep_utils.h
index ed699ea..fa7e302 100644
--- a/sql/wsrep_utils.h
+++ b/sql/wsrep_utils.h
@@ -155,6 +155,7 @@ class Address {
   }
 
   bool parse_port(const char *port) {
+    errno= 0;                                   /* Reset the errno */
     m_port= strtol(port, NULL, 10);
     if (errno == EINVAL || errno == ERANGE)
     {


More information about the commits mailing list