Commit 3e0fcd91 authored by unknown's avatar unknown

Remove the fix for Bug#10668 "CREATE USER does not enforce username

length limit", it's superseded by the fix for Bug#16899 "Possible buffer
overflow in handling of DEFINER-clause". Update test results.


mysql-test/r/grant.result:
  A post-merge fix.
mysql-test/t/grant.test:
  A new error is returned, use the default database after drop database.
sql/sql_acl.cc:
  Remove an unneeded check.
parent 8ea5f31a
......@@ -943,8 +943,9 @@ DROP TABLE mysqltest3.t_nn;
DROP DATABASE mysqltest3;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
DROP USER 'mysqltest_1'@'localhost';
use test;
create user mysqltest1_thisisreallytoolong;
ERROR HY000: Operation CREATE USER failed for 'mysqltest1_thisisreallytoolong'@'%'
ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16)
GRANT CREATE ON mysqltest.* TO 1234567890abcdefGHIKL@localhost;
ERROR HY000: String '1234567890abcdefGHIKL' is too long for user name (should be no longer than 16)
GRANT CREATE ON mysqltest.* TO some_user_name@1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY;
......
......@@ -805,12 +805,13 @@ DROP DATABASE mysqltest3;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost';
DROP USER 'mysqltest_1'@'localhost';
# eestore the original database
use test;
#
# Bug #10668: CREATE USER does not enforce username length limit
#
--error ER_CANNOT_USER
--error ER_WRONG_STRING_LENGTH
create user mysqltest1_thisisreallytoolong;
#
......
......@@ -5232,14 +5232,6 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list)
continue;
}
if (user_name->host.length > HOSTNAME_LENGTH ||
user_name->user.length > USERNAME_LENGTH)
{
append_user(&wrong_users, user_name);
result= TRUE;
continue;
}
/*
Search all in-memory structures and grant tables
for a mention of the new user name.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment