Fix change user problems

This commit is contained in:
wangbin579 2018-07-09 16:44:27 +08:00
parent debbaa4166
commit beeca02c30
3 changed files with 15 additions and 0 deletions

View File

@ -929,6 +929,11 @@ adjust_user(network_mysqld_con *con)
chuser.username = con->client->response->username;
chuser.auth_plugin_data = con->server->challenge->auth_plugin_data;
chuser.hashed_pwd = hashed_password;
if (strcmp(con->client->default_db->str, "") == 0) {
g_string_assign_len(con->client->default_db,
con->srv->default_db, strlen(con->srv->default_db));
}
chuser.database = con->client->default_db;
chuser.charset = con->client->charset_code;

View File

@ -1640,6 +1640,11 @@ check_user_consistant(network_mysqld_con *con)
chuser.username = con->client->response->username;
chuser.auth_plugin_data = ss->server->challenge->auth_plugin_data;
chuser.hashed_pwd = hashed_password;
if (strcmp(con->client->default_db->str, "") == 0) {
g_string_assign_len(con->client->default_db,
con->srv->default_db, strlen(con->srv->default_db));
}
chuser.database = con->client->default_db;
chuser.charset = con->client->charset_code;

View File

@ -4762,6 +4762,11 @@ void
network_connection_pool_create_conn(network_mysqld_con *con)
{
chassis *srv = con->srv;
if (srv->maintain_close_mode) {
return;
}
chassis_private *g = srv->priv;
int i;