List:Commits« Previous MessageNext Message »
From:konstantin Date:August 29 2006 11:48pm
Subject:bk commit into 5.0 tree (kostja:1.2255) BUG#16899
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kostja. When kostja does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-30 01:48:15+04:00, kostja@stripped +3 -0
  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@stripped, 2006-08-30 01:48:11+04:00, kostja@stripped +2 -1
    A post-merge fix.

  mysql-test/t/grant.test@stripped, 2006-08-30 01:48:11+04:00, kostja@stripped +3 -2
    A new error is returned, use the default database after drop database.

  sql/sql_acl.cc@stripped, 2006-08-30 01:48:11+04:00, kostja@stripped +0 -8
    Remove an unneeded check.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	kostja
# Host:	bodhi.local
# Root:	/opt/local/work/mysql-5.0-14897

--- 1.205/sql/sql_acl.cc	2006-08-30 01:48:28 +04:00
+++ 1.206/sql/sql_acl.cc	2006-08-30 01:48:28 +04:00
@@ -5232,14 +5232,6 @@ bool mysql_create_user(THD *thd, List <L
       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.

--- 1.58/mysql-test/r/grant.result	2006-08-30 01:48:28 +04:00
+++ 1.59/mysql-test/r/grant.result	2006-08-30 01:48:28 +04:00
@@ -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;

--- 1.46/mysql-test/t/grant.test	2006-08-30 01:48:28 +04:00
+++ 1.47/mysql-test/t/grant.test	2006-08-30 01:48:28 +04:00
@@ -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;
 
 #
Thread
bk commit into 5.0 tree (kostja:1.2255) BUG#16899konstantin29 Aug