Commit c627a6ce authored by cmiller@zippy.cornsilk.net's avatar cmiller@zippy.cornsilk.net

Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge

into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
parents 00ab7be7 bbe12178
......@@ -868,3 +868,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
......@@ -682,4 +682,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
......@@ -8,8 +8,8 @@
# server or run mysql-test-run --debug mysql_client_test and check
# var/log/mysql_client_test.trace
--disable_result_log
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M
--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1
--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1
# End of 4.1 tests
echo ok;
......
#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
#define INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
#if defined(_SCO_DS) && !defined(SHUT_RDWR)
#if (defined(_SCO_DS) || defined(UNIXWARE_7)) && !defined(SHUT_RDWR)
/*
SHUT_* functions are defined only if
"(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 >= 1)"
*/
#define SHUT_RDWR 2
#endif
......
......@@ -1409,7 +1409,7 @@ static void network_init(void)
uint waited;
uint this_wait;
uint retry;
DBUG_ENTER("server_init");
DBUG_ENTER("network_init");
LINT_INIT(ret);
set_ports();
......
......@@ -5260,7 +5260,16 @@ 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.
......
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