From: sergeyv Date: December 12 2005 3:35pm Subject: bk commit into 5.0 tree (SergeyV:1.1994) BUG#14829 List-Archive: http://lists.mysql.com/commits/74 X-Bug: 14829 Message-Id: <200512121535.jBCFZAlE000835@selena.creware.com> Below is the list of changes that have just been committed into a local 5.0 repository of sergeyv. When sergeyv 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 1.1994 05/12/12 18:34:53 SergeyV@selena. +3 -0 Fixes bug #14829. On user DROP operation acl_host_check hash is reloaded in the same way as it is done for GRANT operation. sql/sql_acl.cc 1.185 05/12/12 18:34:35 SergeyV@selena. +9 -0 Fixes bug #14829. On user DROP operation acl_host_check hash is reloaded in the same way as it is done for GRANT operation. mysql-test/t/grant.test 1.37 05/12/12 18:34:34 SergeyV@selena. +31 -0 Added test for bug #14829 mysql-test/r/grant.result 1.47 05/12/12 18:34:33 SergeyV@selena. +13 -0 Added result for bug #14829 # 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: SergeyV # Host: selena. # Root: H:/MYSQL/src/#14829-mysql-5.0 --- 1.184/sql/sql_acl.cc 2005-12-06 19:04:21 +03:00 +++ 1.185/sql/sql_acl.cc 2005-12-12 18:34:35 +03:00 @@ -5127,6 +5127,15 @@ } } end: + + if (drop) + { + /* We must free acl_check_hosts as its memory is mapped to acl_user */ + delete_dynamic(&acl_wild_hosts); + hash_free(&acl_check_hosts); + init_check_host(); + } + DBUG_RETURN(result); } --- 1.46/mysql-test/r/grant.result 2005-11-28 16:06:26 +03:00 +++ 1.47/mysql-test/r/grant.result 2005-12-12 18:34:33 +03:00 @@ -615,3 +615,16 @@ Grants for root@localhost GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION set names latin1; +create user 'aaaaaa'@'localhost'; +create user 'bbbbbb'@'localhost'; +create user 'cccccc'@'localhost'; +create user 'dddddd'@'localhost'; +create user 'eeeeee'@'localhost'; +create user 'gggggg'@'localhost'; +drop user 'gggggg'@'localhost'; +drop user 'aaaaaa'@'localhost'; +drop user 'bbbbbb'@'localhost'; +drop user 'cccccc'@'localhost'; +drop user 'dddddd'@'localhost'; +drop user 'eeeeee'@'localhost'; + --- 1.36/mysql-test/t/grant.test 2005-11-28 14:28:37 +03:00 +++ 1.37/mysql-test/t/grant.test 2005-12-12 18:34:34 +03:00 @@ -499,4 +499,35 @@ show grants for root@localhost; set names latin1; +# +# Bug #14829 Can't log in from localhost after dropping user +# +disconnect default; + +connect (conn1,localhost,root,,); +connection conn1; +create user 'aaaaaa'@'localhost'; +create user 'bbbbbb'@'localhost'; +create user 'cccccc'@'localhost'; +create user 'dddddd'@'localhost'; +create user 'eeeeee'@'localhost'; +disconnect conn1; + +connect (conn1,localhost,root,,); +connection conn1; +create user 'gggggg'@'localhost'; +drop user 'gggggg'@'localhost'; +disconnect conn1; + +connect (conn1,localhost,root,,); +connection conn1; +drop user 'aaaaaa'@'localhost'; +drop user 'bbbbbb'@'localhost'; +drop user 'cccccc'@'localhost'; +drop user 'dddddd'@'localhost'; +drop user 'eeeeee'@'localhost'; +disconnect conn1; + +connect (default,localhost,root,,); + # End of 4.1 tests