summaryrefslogtreecommitdiff
path: root/mysql-test/r/grant2.result
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-03-02 16:30:24 -0800
committerunknown <jimw@mysql.com>2005-03-02 16:30:24 -0800
commitc9b4f8c3d7b462ecc8cee1e434de244aa0cc3c2a (patch)
tree2b761960f88dceee348a5f5fc94c1a20eccc4e40 /mysql-test/r/grant2.result
parent90eed6566b306eb048efeb9612500e4f6658b44c (diff)
downloadmariadb-git-c9b4f8c3d7b462ecc8cee1e434de244aa0cc3c2a.tar.gz
Fix bug in checking of table-specific grats that caused IP/NETMASK
hostnames to not be matched correctly. (Bug #3309) sql/sql_acl.cc: Use an acl_host_or_ip in the GRANT_TABLE struct instead of storing the host itself, and use compare_hostname() in testing it. This adds support for IP addresses with netmasks to table-specific grants, and results in simplified code by making use of compare_hostname() in more places. mysql-test/r/grant2.result: Add new results mysql-test/t/grant2.test: Add new regression test
Diffstat (limited to 'mysql-test/r/grant2.result')
-rw-r--r--mysql-test/r/grant2.result16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result
index 6d8bdbaf8f9..8200d112709 100644
--- a/mysql-test/r/grant2.result
+++ b/mysql-test/r/grant2.result
@@ -63,3 +63,19 @@ delete from mysql.columns_priv where user like 'mysqltest\_%';
flush privileges;
drop database mysqltest;
use test;
+create database mysqltest_1;
+create table mysqltest_1.t1 (i int);
+insert into mysqltest_1.t1 values (1),(2),(3);
+GRANT ALL ON mysqltest_1.t1 TO mysqltest_1@'127.0.0.0/255.0.0.0';
+show grants for current_user();
+Grants for mysqltest_1@127.0.0.0/255.0.0.0
+GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.0/255.0.0.0'
+GRANT ALL PRIVILEGES ON `mysqltest_1`.`t1` TO 'mysqltest_1'@'127.0.0.0/255.0.0.0'
+select * from t1;
+i
+1
+2
+3
+REVOKE ALL ON mysqltest_1.t1 FROM mysqltest_1@'127.0.0.0/255.0.0.0';
+drop table mysqltest_1.t1;
+drop database mysqltest_1;