mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte include/mysql_com.h: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte added new constants NAME_BYTE_LEN, USERNAME_BYTE_LENGTH, SYSTEM_CHARSET_MBMAXLEN mysql-test/r/ctype_utf8.result: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte test case mysql-test/t/ctype_utf8.test: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte test case sql-common/client.c: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte increased buffers for user name & db sql/sql_acl.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte check that user name is not longer than USERNAME_LENGTH symbols sql/sql_parse.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte increased buffers for user name & db sql/table.cc: Bug#20393 User name truncation in mysql client Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte check that db name is not longer than NAME_LEN symbols
This commit is contained in:
@@ -2640,7 +2640,11 @@ int mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
|
||||
while ((Str = str_list++))
|
||||
{
|
||||
if (Str->host.length > HOSTNAME_LENGTH ||
|
||||
Str->user.length > USERNAME_LENGTH)
|
||||
system_charset_info->cset->charpos(system_charset_info,
|
||||
Str->user.str,
|
||||
Str->user.str +
|
||||
Str->user.length,
|
||||
USERNAME_LENGTH) < Str->user.length)
|
||||
{
|
||||
my_error(ER_GRANT_WRONG_HOST_OR_USER,MYF(0));
|
||||
result= -1;
|
||||
|
||||
Reference in New Issue
Block a user