Commit b74332ec authored by unknown's avatar unknown

fixed after-merge bug in CHANG_USER command


sql/sql_parse.cc:
  fixed after-merge bug in CHANGE_USER command
parent 15c0fe47
...@@ -1192,14 +1192,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1192,14 +1192,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ? uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
*passwd++ : strlen(passwd); *passwd++ : strlen(passwd);
db+= passwd_len + 1; db+= passwd_len + 1;
/* Convert database name to utf8 */
String convdb;
convdb.copy(db, strlen(db), thd->variables.character_set_client,
system_charset_info);
db= convdb.c_ptr();
/* Small check for incomming packet */ /* Small check for incomming packet */
if ((uint) ((uchar*) db - net->read_pos) > packet_length) if ((uint) ((uchar*) db - net->read_pos) > packet_length)
{ {
...@@ -1207,6 +1199,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1207,6 +1199,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
break; break;
} }
/* Convert database name to utf8 */
String convdb;
convdb.copy(db, strlen(db), thd->variables.character_set_client,
system_charset_info);
db= convdb.c_ptr();
/* Save user and privileges */ /* Save user and privileges */
uint save_master_access= thd->master_access; uint save_master_access= thd->master_access;
uint save_db_access= thd->db_access; uint save_db_access= thd->db_access;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment