summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_connection.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2018-06-06 00:17:34 +0200
committerJohannes Schlüter <johannes@php.net>2018-06-06 00:17:34 +0200
commitd6e81f0bfd0cb90586dd83d4fd47a4302605261a (patch)
treec3e57467a65c5981ad2fd892eb01aa5c9e63cc98 /ext/mysqlnd/mysqlnd_connection.c
parent6c3b70e9a56d2f46cc2293c9821f46db9040d29b (diff)
downloadphp-git-d6e81f0bfd0cb90586dd83d4fd47a4302605261a.tar.gz
Fix MySQL 8 auth
Diffstat (limited to 'ext/mysqlnd/mysqlnd_connection.c')
-rw-r--r--ext/mysqlnd/mysqlnd_connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c
index 654673f500..e77e3c1fb4 100644
--- a/ext/mysqlnd/mysqlnd_connection.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -678,7 +678,10 @@ 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;
}
}