mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria" - Fixed wrong assert in Aria Now need to merge with latest xtradb before pushing sql/ha_partition.cc: Ensure that m_ordered_rec_buffer is not freed before close. sql/mysqld.cc: Changed to use opt_stack_trace instead of opt_pstack. Removed references to pstack sql/partition_element.h: Ensure that connect_string is initialized storage/maria/ma_key_recover.c: Fixed wrong assert
This commit is contained in:
@@ -902,6 +902,19 @@ static int check_connection(THD *thd)
|
||||
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';
|
||||
}
|
||||
|
||||
if (thd->main_security_ctx.user)
|
||||
x_free(thd->main_security_ctx.user);
|
||||
if (!(thd->main_security_ctx.user= my_strdup(user, MYF(MY_WME))))
|
||||
|
Reference in New Issue
Block a user