Below is the list of changes that have just been committed into a local
5.1 repository of alik. When alik does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-10-01 15:41:18+04:00, anozdrin@station. +2 -0
BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call.
Use 2 bytes for character set number.
libmysql/libmysql.c@stripped, 2007-10-01 15:41:16+04:00, anozdrin@station. +2 -2
BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call.
Use 2 bytes for character set number.
sql/sql_parse.cc@stripped, 2007-10-01 15:41:16+04:00, anozdrin@station. +11 -2
BUG#30472: libmysql doesn't reset charset, insert_id after
succ. mysql_change_user() call.
Use 2 bytes for character set number.
diff -Nrup a/libmysql/libmysql.c b/libmysql/libmysql.c
--- a/libmysql/libmysql.c 2007-09-29 23:31:05 +04:00
+++ b/libmysql/libmysql.c 2007-10-01 15:41:16 +04:00
@@ -736,8 +736,8 @@ my_bool STDCALL mysql_change_user(MYSQL
if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
{
- *end= (uchar) mysql->charset->number;
- ++end;
+ int2store(end, (ushort) mysql->charset->number);
+ end+= 2;
}
/* Write authentication package */
diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc 2007-09-28 23:30:52 +04:00
+++ b/sql/sql_parse.cc 2007-10-01 15:41:16 +04:00
@@ -878,10 +878,19 @@ bool dispatch_command(enum enum_server_c
}
db_length= strlen(db);
+ char *ptr= db + db_length + 1;
uint cs_number= 0;
- if (db + db_length < packet_end)
- cs_number= (uchar) *(db + db_length + 1);
+ if (ptr < packet_end)
+ {
+ if (ptr + 2 > packet_end)
+ {
+ my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
+ break;
+ }
+
+ cs_number= uint2korr(ptr);
+ }
/* Convert database name to utf8 */
db_buff[copy_and_convert(db_buff, sizeof(db_buff)-1,