summaryrefslogtreecommitdiff
path: root/client/client_priv.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2023-05-17 14:58:11 +0200
commit2543673dd22782f59299fd2e72179601892bd967 (patch)
treeb73641bd88c9d1572203c75da618fce1937518e8 /client/client_priv.h
parent4e5b771e980edfdad5c5414aa62c81d409d585a4 (diff)
parentef911553f442cbb1baaac2af44c38b54fd058c41 (diff)
downloadmariadb-git-2543673dd22782f59299fd2e72179601892bd967.tar.gz
Merge branch '11.0' into 11.1bb-11.1-release
Diffstat (limited to 'client/client_priv.h')
-rw-r--r--client/client_priv.h48
1 files changed, 0 insertions, 48 deletions
diff --git a/client/client_priv.h b/client/client_priv.h
index bd768d1874c..597c074c9c2 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -153,51 +153,3 @@ enum options_client
#else
#define SOCKET_PROTOCOL_TO_FORCE MYSQL_PROTOCOL_PIPE
#endif
-
-/**
- Utility function to implicitly change the connection protocol to a
- consistent value given the command line arguments. Additionally,
- warns the user that the protocol has been changed.
-
- Arguments:
- @param [in] host Name of the host to connect to
- @param [in, out] opt_protocol Location of the protocol option
- variable to update
- @param [in] new_protocol New protocol to force
-*/
-static inline void warn_protocol_override(char *host,
- uint *opt_protocol,
- uint new_protocol)
-{
- DBUG_ASSERT(new_protocol == MYSQL_PROTOCOL_TCP
- || new_protocol == SOCKET_PROTOCOL_TO_FORCE);
-
-
- if ((host == NULL
- || strncmp(host, LOCAL_HOST, sizeof(LOCAL_HOST)-1) == 0))
- {
- const char *protocol_name;
-
- if (*opt_protocol == MYSQL_PROTOCOL_DEFAULT
-#ifndef _WIN32
- && new_protocol == MYSQL_PROTOCOL_SOCKET
-#else
- && new_protocol == MYSQL_PROTOCOL_TCP
-#endif
- )
- {
- /* This is already the default behavior, do nothing */
- return;
- }
-
- protocol_name= sql_protocol_typelib.type_names[new_protocol-1];
-
- fprintf(stderr, "%s %s %s\n",
- "WARNING: Forcing protocol to ",
- protocol_name,
- " due to option specification. "
- "Please explicitly state intended protocol.");
-
- *opt_protocol = new_protocol;
- }
-}