Loading mysql-test/r/grant.result +3 −0 Original line number Diff line number Diff line Loading @@ -867,3 +867,6 @@ insert into mysql.user select * from t2; flush privileges; drop table t2; drop table t1; create user mysqltest1_thisisreallytoolong; ERROR HY000: Operation CREATE USER failed for 'mysqltest1_thisisreallytoolong'@'%' End of 5.0 tests mysql-test/t/grant.test +6 −0 Original line number Diff line number Diff line Loading @@ -680,4 +680,10 @@ drop table t2; drop table t1; # # Bug #10668: CREATE USER does not enforce username length limit # --error ER_CANNOT_USER create user mysqltest1_thisisreallytoolong; --echo End of 5.0 tests sql/sql_acl.cc +10 −1 Original line number Diff line number Diff line Loading @@ -5221,6 +5221,15 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list) result= TRUE; 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. Loading Loading
mysql-test/r/grant.result +3 −0 Original line number Diff line number Diff line Loading @@ -867,3 +867,6 @@ insert into mysql.user select * from t2; flush privileges; drop table t2; drop table t1; create user mysqltest1_thisisreallytoolong; ERROR HY000: Operation CREATE USER failed for 'mysqltest1_thisisreallytoolong'@'%' End of 5.0 tests
mysql-test/t/grant.test +6 −0 Original line number Diff line number Diff line Loading @@ -680,4 +680,10 @@ drop table t2; drop table t1; # # Bug #10668: CREATE USER does not enforce username length limit # --error ER_CANNOT_USER create user mysqltest1_thisisreallytoolong; --echo End of 5.0 tests
sql/sql_acl.cc +10 −1 Original line number Diff line number Diff line Loading @@ -5221,6 +5221,15 @@ bool mysql_create_user(THD *thd, List <LEX_USER> &list) result= TRUE; 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. Loading