summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@station.>2007-10-01 15:41:18 +0400
committerunknown <anozdrin/alik@station.>2007-10-01 15:41:18 +0400
commit11476cfc042a316399efbd59016a9898390f0f6b (patch)
treec4338877e0e49fbb1ab2e9e7ae14d8ef00c84163 /libmysql
parent3175946b754859222d1ddabb428f642d6d306252 (diff)
downloadmariadb-git-11476cfc042a316399efbd59016a9898390f0f6b.tar.gz
BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call. Use 2 bytes for character set number.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index adac6c7cd48..f2c16eb85de 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -736,8 +736,8 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
{
- *end= (uchar) mysql->charset->number;
- ++end;
+ int2store(end, (ushort) mysql->charset->number);
+ end+= 2;
}
/* Write authentication package */