summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_auth.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2013-01-15 10:04:59 +0100
committerAndrey Hristov <andrey@php.net>2013-01-15 10:04:59 +0100
commit1ff43522630f0f98c20e884890f77e6593a43f3b (patch)
treed567b8d483870f97f2c88e6a020e2eaccdb633ec /ext/mysqlnd/mysqlnd_auth.c
parentbe07f815f240803fe7a48a5fb3d68a169bef4707 (diff)
downloadphp-git-1ff43522630f0f98c20e884890f77e6593a43f3b.tar.gz
Add support for connect attributes, as of MySQL 5.6
Diffstat (limited to 'ext/mysqlnd/mysqlnd_auth.c')
-rw-r--r--ext/mysqlnd/mysqlnd_auth.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c
index a3b4f36a2e..8611d99864 100644
--- a/ext/mysqlnd/mysqlnd_auth.c
+++ b/ext/mysqlnd/mysqlnd_auth.c
@@ -28,7 +28,6 @@
#include "mysqlnd_charset.h"
#include "mysqlnd_debug.h"
-
/* {{{ mysqlnd_auth_handshake */
enum_func_status
mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
@@ -99,6 +98,10 @@ mysqlnd_auth_handshake(MYSQLND_CONN_DATA * conn,
auth_packet->auth_data = auth_plugin_data;
auth_packet->auth_data_len = auth_plugin_data_len;
auth_packet->auth_plugin_name = auth_protocol;
+
+ if (conn->server_capabilities & CLIENT_CONNECT_ATTRS) {
+ auth_packet->connect_attr = conn->options->connect_attr;
+ }
if (!PACKET_WRITE(auth_packet, conn)) {
goto end;