summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/gluh.(none)>2006-08-30 15:56:17 +0500
committerunknown <gluh@mysql.com/gluh.(none)>2006-08-30 15:56:17 +0500
commitddb9f8668fa10166e4ffb761dc54a25a007c5bfa (patch)
treebadf8f73c40042fa5b387f7c6af18f4e9f4f7696 /sql/sql_acl.cc
parent2416a453eb21f56483865e42cbe568f0cf5a609e (diff)
downloadmariadb-git-ddb9f8668fa10166e4ffb761dc54a25a007c5bfa.tar.gz
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
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 0ad5432f3eb..6ede19d0e96 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -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;