diff options
author | Aleksey Midenkov <midenok@gmail.com> | 2019-11-25 16:03:45 +0300 |
---|---|---|
committer | Aleksey Midenkov <midenok@gmail.com> | 2019-11-25 16:03:45 +0300 |
commit | a34c34d9a8d3159c5a0de281f4b0253a58ab2311 (patch) | |
tree | 4f0052d39e2c03fc3b72e899682f81024b1bd241 /storage/federatedx | |
parent | 33f55789d354b0fccf5234027dc0bd66cbd0c539 (diff) | |
parent | 1d5f6a007339ce78471c125a9a5d5a73a5c664ff (diff) | |
download | mariadb-git-a34c34d9a8d3159c5a0de281f4b0253a58ab2311.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'storage/federatedx')
-rw-r--r-- | storage/federatedx/ha_federatedx.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index bea7f2cfb87..49101447dda 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -807,12 +807,12 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share, goto error; if (share->hostname[0] == '\0') - share->hostname= NULL; + share->hostname= strdup_root(mem_root, my_localhost); } if (!share->port) { - if (!share->hostname || strcmp(share->hostname, my_localhost) == 0) + if (0 == strcmp(share->hostname, my_localhost)) share->socket= (char *) MYSQL_UNIX_ADDR; else share->port= MYSQL_PORT; @@ -3394,8 +3394,7 @@ int ha_federatedx::create(const char *name, TABLE *table_arg, goto error; /* loopback socket connections hang due to LOCK_open mutex */ - if ((!tmp_share.hostname || !strcmp(tmp_share.hostname,my_localhost)) && - !tmp_share.port) + if (0 == strcmp(tmp_share.hostname, my_localhost) && !tmp_share.port) goto error; /* |