1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-29718 Fix spider detection of same data node server

When the host is not specified, it defaults to localhost.
This commit is contained in:
Yuchen Pei
2024-01-10 16:37:36 +11:00
parent eabc74aaef
commit bc3d416a17
33 changed files with 41 additions and 2 deletions

View File

@@ -1985,7 +1985,7 @@ int spider_db_mbase::connect(
if (!spider_param_same_server_link(thd))
{
if (!strcmp(tgt_host, my_localhost))
if (!strcmp(tgt_host, my_localhost) || !tgt_host || !tgt_host[0])
{
if (!strcmp(tgt_socket, *spd_mysqld_unix_port))
{
@@ -1995,7 +1995,7 @@ int spider_db_mbase::connect(
DBUG_RETURN(ER_SPIDER_SAME_SERVER_LINK_NUM);
}
} else if (!strcmp(tgt_host, "127.0.0.1") ||
!strcmp(tgt_host, glob_hostname))
!strcmp(tgt_host, glob_hostname) || !tgt_host || !tgt_host[0])
{
if (tgt_port == (long) *spd_mysqld_port)
{