Loading mysql-test/r/grant.result +19 −0 Original line number Diff line number Diff line Loading @@ -624,3 +624,22 @@ drop user mysqltest_7@; flush privileges; 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; mysql-test/t/grant.test +16 −0 Original line number Diff line number Diff line Loading @@ -511,4 +511,20 @@ flush privileges; # BUG#16297(flush should be removed when that bug is fixed) --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 sql/sql_acl.cc +4 −1 Original line number Diff line number Diff line Loading @@ -2258,7 +2258,10 @@ static GRANT_NAME *name_hash_search(HASH *name_hash, { if (exact) { if (compare_hostname(&grant_name->host, host, ip)) if ((host && !my_strcasecmp(system_charset_info, host, grant_name->host.hostname)) || (ip && !strcmp(ip, grant_name->host.hostname))) return grant_name; } else Loading Loading
mysql-test/r/grant.result +19 −0 Original line number Diff line number Diff line Loading @@ -624,3 +624,22 @@ drop user mysqltest_7@; flush privileges; 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;
mysql-test/t/grant.test +16 −0 Original line number Diff line number Diff line Loading @@ -511,4 +511,20 @@ flush privileges; # BUG#16297(flush should be removed when that bug is fixed) --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
sql/sql_acl.cc +4 −1 Original line number Diff line number Diff line Loading @@ -2258,7 +2258,10 @@ static GRANT_NAME *name_hash_search(HASH *name_hash, { if (exact) { if (compare_hostname(&grant_name->host, host, ip)) if ((host && !my_strcasecmp(system_charset_info, host, grant_name->host.hostname)) || (ip && !strcmp(ip, grant_name->host.hostname))) return grant_name; } else Loading