Merge with 5.1 to get in changes from MySQL 5.1.55

This commit is contained in:
Michael Widenius 2011-02-28 19:39:30 +02:00
commit 3358cdd504
1605 changed files with 28760 additions and 44097 deletions

View file

@ -7560,6 +7560,19 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
user_len-= 2;
}
/*
Clip username to allowed length in characters (not bytes). This is
mostly for backward compatibility.
*/
{
CHARSET_INFO *cs= system_charset_info;
int err;
user_len= (uint) cs->cset->well_formed_len(cs, user, user + user_len,
USERNAME_CHAR_LENGTH, &err);
user[user_len]= '\0';
}
Security_context *sctx= thd->security_ctx;
if (thd->make_lex_string(&mpvio->db, db, db_len, 0) == 0)