fix the problem for connect_attr, set db condition, and add a new attribute _server_host

This commit is contained in:
Qianqian Bu 2019-08-12 04:00:31 +02:00 committed by Christoph M. Becker
parent 81f52158b4
commit cdf16c010a
6 changed files with 152 additions and 2 deletions

View file

@ -425,6 +425,9 @@ mysqlnd_auth_change_user(MYSQLND_CONN_DATA * const conn,
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 (conn->m->get_server_version(conn) >= 50123) {
auth_packet->charset_no = conn->charset->nr;