summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkostja@oak.local <>2003-09-03 17:29:51 +0400
committerkostja@oak.local <>2003-09-03 17:29:51 +0400
commit2335c7a0d4656e099917d0702966a8c50d91d3db (patch)
tree4bf8fe41da060a5b96e69e5a1656ec92f90413c1
parent711a3f6806347f720c029c4796bbd1ef7b6d2bbc (diff)
downloadmariadb-git-2335c7a0d4656e099917d0702966a8c50d91d3db.tar.gz
fixed after-merge bug in CHANG_USER command
-rw-r--r--sql/sql_parse.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 383b6b0f581..0a9a57d86bb 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1192,14 +1192,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
*passwd++ : strlen(passwd);
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 */
if ((uint) ((uchar*) db - net->read_pos) > packet_length)
{
@@ -1207,6 +1199,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
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 */
uint save_master_access= thd->master_access;
uint save_db_access= thd->db_access;