mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-10056: SST method mysqldump is broken
errno must be reset before strtol()/strtoll() functions are invoked.
This commit is contained in:
@ -340,6 +340,7 @@ static int sst_scan_uuid_seqno (const char* str,
|
|||||||
wsrep_uuid_t* uuid, wsrep_seqno_t* seqno)
|
wsrep_uuid_t* uuid, wsrep_seqno_t* seqno)
|
||||||
{
|
{
|
||||||
int offt = wsrep_uuid_scan (str, strlen(str), uuid);
|
int offt = wsrep_uuid_scan (str, strlen(str), uuid);
|
||||||
|
errno= 0; /* Reset the errno */
|
||||||
if (offt > 0 && strlen(str) > (unsigned int)offt && ':' == str[offt])
|
if (offt > 0 && strlen(str) > (unsigned int)offt && ':' == str[offt])
|
||||||
{
|
{
|
||||||
*seqno = strtoll (str + offt + 1, NULL, 10);
|
*seqno = strtoll (str + offt + 1, NULL, 10);
|
||||||
|
@ -155,6 +155,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool parse_port(const char *port) {
|
bool parse_port(const char *port) {
|
||||||
|
errno= 0; /* Reset the errno */
|
||||||
m_port= strtol(port, NULL, 10);
|
m_port= strtol(port, NULL, 10);
|
||||||
if (errno == EINVAL || errno == ERANGE)
|
if (errno == EINVAL || errno == ERANGE)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user