Below is the list of changes that have just been committed into a local
4.1 repository of gluh. When gluh 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.2460 06/03/06 14:03:40 gluh@stripped +3 -0
Fix for bug#14385 GRANT and mapping to correct user account problems
Check if the host of table hash record exactly matches host from GRANT command
sql/sql_acl.cc
1.174 06/03/06 14:02:54 gluh@stripped +4 -1
Fix for bug#14385 GRANT and mapping to correct user account problems
Check if the host of table hash record exactly matches host from GRANT command
mysql-test/t/grant.test
1.34 06/03/06 14:02:53 gluh@stripped +16 -0
Fix for bug#14385 GRANT and mapping to correct user account problems
test case
mysql-test/r/grant.result
1.41 06/03/06 14:02:53 gluh@stripped +18 -0
Fix for bug#14385 GRANT and mapping to correct user account problems
test case
# 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: gluh
# Host: eagle.intranet.mysql.r18.ru
# Root: /home/gluh/MySQL/Merge/4.1
--- 1.173/sql/sql_acl.cc Mon Jan 9 13:57:23 2006
+++ 1.174/sql/sql_acl.cc Mon Mar 6 14:02:54 2006
@@ -2001,7 +2001,10 @@ static GRANT_TABLE *table_hash_search(co
{
if (exact)
{
- if (compare_hostname(&grant_table->host, host, ip))
+ if ((host &&
+ !my_strcasecmp(system_charset_info, host,
+ grant_table->host.hostname)) ||
+ (ip && !strcmp(ip, grant_table->host.hostname)))
return grant_table;
}
else
--- 1.40/mysql-test/r/grant.result Mon Jan 9 13:31:01 2006
+++ 1.41/mysql-test/r/grant.result Mon Mar 6 14:02:53 2006
@@ -473,3 +473,21 @@ GRANT USAGE ON *.* TO 'mysqltest_7'@'' I
drop user mysqltest_7@;
show grants for mysqltest_7@;
ERROR 42000: There is no such grant defined for user 'mysqltest_7' on host ''
+create database mysqltest;
+use mysqltest;
+create table t1(f1 int);
+GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%';
+GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%';
+show grants for mysqltest1@'192.%';
+Grants for mysqltest1@192.%
+GRANT USAGE ON *.* TO 'mysqltest1'@'192.%'
+GRANT SELECT ON `mysqltest`.`t1` TO 'mysqltest1'@'192.%'
+show grants for mysqltest1@'%';
+Grants for mysqltest1@%
+GRANT USAGE ON *.* TO 'mysqltest1'@'%'
+GRANT DELETE ON `mysqltest`.`t1` TO 'mysqltest1'@'%'
+delete from mysql.user where user='mysqltest1';
+delete from mysql.db where user='mysqltest1';
+delete from mysql.tables_priv where user='mysqltest1';
+flush privileges;
+drop database mysqltest;
--- 1.33/mysql-test/t/grant.test Mon Jan 9 13:31:01 2006
+++ 1.34/mysql-test/t/grant.test Mon Mar 6 14:02:53 2006
@@ -433,4 +433,20 @@ drop user mysqltest_7@;
--error 1141
show grants for mysqltest_7@;
+#
+# Bug#14385: GRANT and mapping to correct user account problems
+#
+create database mysqltest;
+use mysqltest;
+create table t1(f1 int);
+GRANT DELETE ON mysqltest.t1 TO mysqltest1@'%';
+GRANT SELECT ON mysqltest.t1 TO mysqltest1@'192.%';
+show grants for mysqltest1@'192.%';
+show grants for mysqltest1@'%';
+delete from mysql.user where user='mysqltest1';
+delete from mysql.db where user='mysqltest1';
+delete from mysql.tables_priv where user='mysqltest1';
+flush privileges;
+drop database mysqltest;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (gluh:1.2460) BUG#14385 | gluh | 6 Mar |