summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_connection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-12-27 13:27:10 +0100
committerNikita Popov <nikita.ppv@gmail.com>2019-12-27 17:27:41 +0100
commit03ee36d1c526b402e1e5f283ee6f1631f3f61982 (patch)
tree981315896952e5c2684dee37f8db170c4f8d9c80 /ext/mysqlnd/mysqlnd_connection.c
parent6225137b4a51da4550f01aafbe8bc39655aedc23 (diff)
downloadphp-git-03ee36d1c526b402e1e5f283ee6f1631f3f61982.tar.gz
Fix unix socket check during caching_sha2_password
The fact that conn->unix_socket is set does not mean that a Unix socket is actually in use -- this member is set in a default configuration. Instead check whether a unix_socket stream ops is used.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_connection.c')
-rw-r--r--ext/mysqlnd/mysqlnd_connection.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c
index 9154731be5..2822672da5 100644
--- a/ext/mysqlnd/mysqlnd_connection.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -671,13 +671,9 @@ MYSQLND_METHOD(mysqlnd_conn_data, connect)(MYSQLND_CONN_DATA * conn,
{
const MYSQLND_CSTRING scheme = { transport.s, transport.l };
- /* This will be overwritten below with a copy, but we can use it during authentication */
- conn->unix_socket.s = (char *)socket_or_pipe.s;
if (FAIL == conn->m->connect_handshake(conn, &scheme, &username, &password, &database, mysql_flags)) {
- conn->unix_socket.s = NULL;
goto err;
}
- conn->unix_socket.s = NULL;
}
{