Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson 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.2462 05/12/23 19:20:17 msvensson@neptunus.(none) +3 -0
BUG#15775 "drop user" command does not refresh acl_check_hosts
- DROP USER command didn't reload the acl_check_hosts cache causing subsequent
connect's via TCP to fail randomly.
- 4.1 version
sql/sql_acl.cc
1.171 05/12/23 19:20:12 msvensson@neptunus.(none) +5 -0
Reload acl_check_hosts as its memory is mapped to acl_user
mysql-test/t/connect.test
1.14 05/12/23 19:20:12 msvensson@neptunus.(none) +28 -0
Test case for connecting via TCP after drop user.
mysql-test/r/connect.result
1.13 05/12/23 19:20:12 msvensson@neptunus.(none) +16 -0
Update test results
# 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: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug15775_part2/my41-bug15775_part2
--- 1.170/sql/sql_acl.cc 2005-11-14 13:33:52 +01:00
+++ 1.171/sql/sql_acl.cc 2005-12-23 19:20:12 +01:00
@@ -3722,6 +3722,11 @@
DBUG_RETURN(-1);
}
delete_dynamic_element(&acl_users, acl_userd);
+
+ /* Reload acl_check_hosts as its memory is mapped to acl_user */
+ delete_dynamic(&acl_wild_hosts);
+ hash_free(&acl_check_hosts);
+ init_check_host();
}
}
--- 1.12/mysql-test/r/connect.result 2005-09-08 10:09:23 +02:00
+++ 1.13/mysql-test/r/connect.result 2005-12-23 19:20:12 +01:00
@@ -71,3 +71,19 @@
set @id := 1;
delete from t1 where id like @id;
drop table t1;
+insert into mysql.user (user, host) values
+('b15775_1', 'host1'),
+('b15775_2', 'host2'),
+('b15775_3', 'host3'),
+('b15775_4', 'host4'),
+('b15775_5', 'host5'),
+('b15775_6', 'host6'),
+('b15775_7', 'host7');
+flush privileges;
+drop user b15775_3@host3;
+drop user b15775_1@host1;
+drop user b15775_2@host2;
+drop user b15775_4@host4;
+drop user b15775_5@host5;
+drop user b15775_6@host6;
+drop user b15775_7@host7;
--- 1.13/mysql-test/t/connect.test 2005-09-08 10:09:24 +02:00
+++ 1.14/mysql-test/t/connect.test 2005-12-23 19:20:12 +01:00
@@ -95,4 +95,32 @@
connection default;
drop table t1;
+insert into mysql.user (user, host) values
+ ('b15775_1', 'host1'),
+ ('b15775_2', 'host2'),
+ ('b15775_3', 'host3'),
+ ('b15775_4', 'host4'),
+ ('b15775_5', 'host5'),
+ ('b15775_6', 'host6'),
+ ('b15775_7', 'host7');
+flush privileges;
+
+drop user b15775_3@host3;
+
+# This connect failed before fix since the acl_check_hosts list was corrupted by the
"drop user"
+connect (con8,127.0.0.1,root,,test,$MASTER_MYPORT,);
+disconnect con8;
+
+connection default;
+drop user b15775_1@host1;
+drop user b15775_2@host2;
+drop user b15775_4@host4;
+drop user b15775_5@host5;
+drop user b15775_6@host6;
+drop user b15775_7@host7;
+
+connect (con9,127.0.0.1,root,,test,$MASTER_MYPORT,);
+disconnect con9;
+connection default;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (msvensson:1.2462) BUG#15775 | msvensson | 23 Dec |