diff options
author | Qianqian Bu <qibu@microsoft.com> | 2019-08-12 04:00:31 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-08-20 13:31:58 +0200 |
commit | cdf16c010a11fc1f91c8807556ccc15b374c0922 (patch) | |
tree | 1cc70da2d80d4315ce9306fdf9b0489e0ac4d113 /ext/mysqlnd/mysqlnd_wireprotocol.c | |
parent | 81f52158b42318f17f67468cccc4a8dc03bba942 (diff) | |
download | php-git-cdf16c010a11fc1f91c8807556ccc15b374c0922.tar.gz |
fix the problem for connect_attr, set db condition, and add a new attribute _server_host
Diffstat (limited to 'ext/mysqlnd/mysqlnd_wireprotocol.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_wireprotocol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 7616540e4f..759b131b63 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -552,7 +552,7 @@ size_t php_mysqlnd_auth_write(void * _packet) p+= packet->auth_data_len; } - if (packet->db) { + if (packet->db_len > 0) { /* CLIENT_CONNECT_WITH_DB should have been set */ size_t real_db_len = MIN(MYSQLND_MAX_ALLOWED_DB_LEN, packet->db_len); memcpy(p, packet->db, real_db_len); |