diff options
Diffstat (limited to 'tests/grant.res')
-rw-r--r-- | tests/grant.res | 137 |
1 files changed, 98 insertions, 39 deletions
diff --git a/tests/grant.res b/tests/grant.res index 91c37a2c9f8..3359f970225 100644 --- a/tests/grant.res +++ b/tests/grant.res @@ -19,16 +19,19 @@ Access denied for user: 'grant_user@localhost' (Using password: NO) set password FOR grant_user='' Connecting grant_user select * from mysql.user where user = 'grant_user' -localhost grant_user Y N N N N N N N N N N N N N +localhost grant_user Y N N N N N N N N N N N N N N N N N N N N 0 0 0 select * from mysql.db where user = 'grant_user' grant select on *.* to grant_user@localhost,grant_user@localhost +show grants for grant_user@localhost +GRANT SELECT ON *.* TO 'grant_user'@'localhost' + insert into mysql.user (host,user) values ('error','grant_user') -Error in execute: Access denied for user: 'grant_user@localhost' to database 'mysql' +Error in execute: insert command denied to user: 'grant_user@localhost' for table 'user' update mysql.user set host='error' WHERE user='grant_user' -Error in execute: Access denied for user: 'grant_user@localhost' to database 'mysql' +Error in execute: update command denied to user: 'grant_user@localhost' for table 'user' create table grant_test.test (a int,b int) -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: create command denied to user: 'grant_user@localhost' for table 'test' grant select on *.* to grant_user2@localhost Error in execute: Access denied for user: 'grant_user@localhost' (Using password: NO) revoke select on grant_test.test from grant_user@opt_host @@ -48,7 +51,7 @@ Error in execute: The host or user argument to GRANT is too long grant select on grant_test.test to grant_user with grant option Error in execute: grant command denied to user: 'grant_user@localhost' for table 'test' set password FOR ''@''='' -Error in execute: You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords +Error in execute: Can't find any matching row in the user table set password FOR root@localhost = password('test') Error in execute: Access denied for user: 'grant_user@localhost' to database 'mysql' revoke select on *.* from grant_user@localhost @@ -93,31 +96,31 @@ delete from user where user='grant_user' flush privileges grant select on grant_test.* to grant_user@localhost select * from mysql.user where user = 'grant_user' -localhost grant_user N N N N N N N N N N N N N N +localhost grant_user N N N N N N N N N N N N N N N N N N N N N 0 0 0 select * from mysql.db where user = 'grant_user' -localhost grant_test grant_user Y N N N N N N N N N +localhost grant_test grant_user Y N N N N N N N N N N N Connecting grant_user select count(*) from grant_test.test 2 select * from mysql.user where user = 'grant_user' -Error in execute: Access denied for user: 'grant_user@localhost' to database 'mysql' +Error in execute: select command denied to user: 'grant_user@localhost' for table 'user' insert into grant_test.test values (4,0) -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: insert command denied to user: 'grant_user@localhost' for table 'test' update grant_test.test set a=1 -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: update command denied to user: 'grant_user@localhost' for table 'test' delete from grant_test.test -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: delete command denied to user: 'grant_user@localhost' for table 'test' create table grant_test.test2 (a int) -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: create command denied to user: 'grant_user@localhost' for table 'test2' ALTER TABLE grant_test.test add c int -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: alter command denied to user: 'grant_user@localhost' for table 'test' CREATE INDEX dummy ON grant_test.test (a) -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: index command denied to user: 'grant_user@localhost' for table 'test' drop table grant_test.test -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: drop command denied to user: 'grant_user@localhost' for table 'test' grant ALL PRIVILEGES on grant_test.* to grant_user2@localhost Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' grant ALL PRIVILEGES on grant_test.* to grant_user@localhost WITH GRANT OPTION @@ -130,14 +133,14 @@ REVOKE ALL PRIVILEGES on grant_test.* from grant_user@localhost REVOKE ALL PRIVILEGES on grant_test.* from grant_user@localhost Connecting grant_user insert into grant_test.test values (6,0) -Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +Error in execute: insert command denied to user: 'grant_user@localhost' for table 'test' REVOKE GRANT OPTION on grant_test.* from grant_user@localhost Connecting grant_user Access denied for user: 'grant_user@localhost' to database 'grant_test' grant ALL PRIVILEGES on grant_test.* to grant_user@localhost Connecting grant_user select * from mysql.user where user = 'grant_user' -Error in execute: Access denied for user: 'grant_user@localhost' to database 'mysql' +Error in execute: select command denied to user: 'grant_user@localhost' for table 'user' insert into grant_test.test values (7,0) update grant_test.test set a=3 where a=2 delete from grant_test.test where a=3 @@ -149,10 +152,10 @@ show tables from grant_test test insert into mysql.user (host,user) values ('error','grant_user',0) -Error in execute: Access denied for user: 'grant_user@localhost' to database 'mysql' +Error in execute: insert command denied to user: 'grant_user@localhost' for table 'user' revoke ALL PRIVILEGES on grant_test.* from grant_user@localhost select * from mysql.user where user = 'grant_user' -localhost grant_user N N N N N N N N N N N N N N +localhost grant_user N N N N N N N N N N N N N N N N N N N N N 0 0 0 select * from mysql.db where user = 'grant_user' Connecting grant_user @@ -168,7 +171,7 @@ Error in execute: select command denied to user: 'grant_user@localhost' for tabl show keys from test Error in execute: select command denied to user: 'grant_user@localhost' for table 'test' show columns from test2 -a int(11) 0 +a int(11) 0 show keys from test2 select * from test @@ -187,11 +190,11 @@ delete from grant_test.test Error in execute: delete command denied to user: 'grant_user@localhost' for table 'test' grant delete on grant_test.test to grant_user@localhost delete from grant_test.test where a=1 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'a' in table 'test' update grant_test.test set b=3 where b=1 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' update grant_test.test set b=b+1 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' select * from test Error in execute: select command denied to user: 'grant_user@localhost' for table 'test' grant select on grant_test.test to grant_user@localhost @@ -264,7 +267,7 @@ Error in execute: Access denied for user: 'grant_user@localhost' to database 'gr drop database grant_test Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' flush tables -Error in execute: Access denied for user: 'grant_user@localhost' (Using password: NO) +Error in execute: Access denied. You need the RELOAD privilege for this operation flush privileges select Host, Db, User, Table_name, Grantor, Table_priv, Column_priv from mysql.tables_priv localhost grant_test grant_user test2 root@localhost Update,Delete,Create,Grant,Index,Alter Insert @@ -288,15 +291,15 @@ grant update(b),delete on grant_test.test to grant_user@localhost revoke update(a) on grant_test.test from grant_user@localhost Error in execute: There is no such grant defined for user 'grant_user' on host 'localhost' on table 'test' delete from grant_test.test where a=2 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'a' in table 'test' update test set b=5 where b>0 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' grant select(a),select(b) on grant_test.test to grant_user@localhost delete from grant_test.test where a=2 delete from grant_test.test where A=2 update test set b=5 where b>0 update test set a=11 where b>5 -Error in execute: update command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +Error in execute: UPDATE command denied to user: 'grant_user@localhost' for column 'a' in table 'test' select a,A from test 8 8 5 5 @@ -330,19 +333,19 @@ update test set b=3 where a > 0 select * from test Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' select b from test -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' select a from test where b > 0 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' insert into test (a) values (10) -Error in execute: insert command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +Error in execute: INSERT command denied to user: 'grant_user@localhost' for column 'a' in table 'test' insert into test (b) values (b) -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' insert into test (a,b) values (1,5) -Error in execute: insert command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +Error in execute: INSERT command denied to user: 'grant_user@localhost' for column 'a' in table 'test' insert into test (b) values (1),(b) -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' update test set b=3 where b > 0 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' select Host, Db, User, Table_name, Grantor, Table_priv, Column_priv from mysql.tables_priv localhost grant_test grant_user test root@localhost Select,Insert,Update @@ -376,13 +379,13 @@ localhost grant_test grant_user test b Select,Insert,Update localhost grant_test grant_user test a Select,Update insert into test (a,b) values (12,12) -Error in execute: insert command denied to user: 'grant_user@localhost' for column 'a' in table 'test' +Error in execute: INSERT command denied to user: 'grant_user@localhost' for column 'a' in table 'test' grant insert on grant_test.* to grant_user@localhost Connecting grant_user insert into test (a,b) values (13,13) revoke select(b) on grant_test.test from grant_user@localhost select count(a) from test where a+b > 0 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' update test set b=5 where a=2 grant select on grant_test.test to grant_user@localhost Connecting grant_user @@ -399,7 +402,7 @@ select count(a) from test where a+b > 0 Error in execute: select command denied to user: 'grant_user@localhost' for table 'test' grant select(a) on grant_test.test to grant_user@localhost select count(a) from test where a+b > 0 -Error in execute: select command denied to user: 'grant_user@localhost' for column 'b' in table 'test' +Error in execute: SELECT command denied to user: 'grant_user@localhost' for column 'b' in table 'test' grant select on *.* to grant_user@localhost Connecting grant_user select count(a) from test where a+b > 0 @@ -412,7 +415,7 @@ select count(a) from test where a+b > 0 4 select * from mysql.db where user = 'grant_user' -localhost grant_test grant_user N Y N N N N N N N N +localhost grant_test grant_user N Y N N N N N N N N N N select Host, Db, User, Table_name, Grantor, Table_priv, Column_priv from mysql.tables_priv where user = 'grant_user' localhost grant_test grant_user test root@localhost Select,Insert,Update @@ -427,16 +430,72 @@ Error in execute: select command denied to user: 'grant_user@localhost' for tabl select * from mysql.user Error in execute: select command denied to user: 'grant_user@localhost' for table 'user' select * from mysql.db where user = 'grant_user' -localhost grant_test grant_user N Y N N N N N N N N +localhost grant_test grant_user N Y N N N N N N N N N N select Host, Db, User, Table_name, Grantor, Table_priv, Column_priv from mysql.tables_priv where user = 'grant_user' select Host, Db, User, Table_name, Column_name, Column_priv from mysql.columns_priv where user = 'grant_user' delete from user where user='grant_user' +delete from db where user='grant_user' flush privileges +show grants for grant_user@localhost +Error in execute: There is no such grant defined for user 'grant_user' on host 'localhost' grant ALL PRIVILEGES on grant_test.test to grant_user@localhost identified by 'dummy', grant_user@127.0.0.1 identified by 'dummy2' Connecting grant_user grant SELECT on grant_test.* to grant_user@localhost identified by '' Connecting grant_user +revoke ALL PRIVILEGES on grant_test.test from grant_user@localhost identified by '' +revoke ALL PRIVILEGES on grant_test.* from grant_user@localhost identified by '' +show grants for grant_user@localhost +create table grant_test.test3 (a int) +grant SELECT on grant_test.test3 to grant_user@localhost +grant FILE on *.* to grant_user@localhost +insert into grant_test.test3 values (1) +Connecting grant_user +select * into outfile '/tmp/mysql-grant.test' from grant_test.test3 +revoke SELECT on grant_test.test3 from grant_user@localhost +revoke FILE on *.* from grant_user@localhost +drop table grant_test.test3 +create table grant_test.test3 (a int) +Connecting grant_user +Access denied for user: 'grant_user@localhost' to database 'grant_test' +grant INSERT on grant_test.test3 to grant_user@localhost +Connecting grant_user +select * into outfile '/tmp/mysql-grant.test' from grant_test.test3 +Error in execute: Access denied for user: 'grant_user@localhost' (Using password: NO) +grant SELECT on grant_test.test3 to grant_user@localhost +Connecting grant_user +LOCK TABLES grant_test.test3 READ +Error in execute: Access denied for user: 'grant_user@localhost' to database 'grant_test' +grant LOCK TABLES on *.* to grant_user@localhost +show grants for grant_user@localhost +GRANT LOCK TABLES ON *.* TO 'grant_user'@'localhost' +GRANT SELECT, INSERT ON grant_test.test3 TO 'grant_user'@'localhost' + +select * from mysql.user where user='grant_user' +127.0.0.1 grant_user 7f70e8b858ee6782 N N N N N N N N N N N N N N N N N N N N N 0 0 0 +localhost grant_user N N N N N N N N N N N N N N N N N Y N N N 0 0 0 + +Connecting grant_user +LOCK TABLES grant_test.test3 READ +UNLOCK TABLES +revoke SELECT,INSERT,UPDATE,DELETE on grant_test.test3 from grant_user@localhost +Connecting grant_user +revoke LOCK TABLES on *.* from grant_user@localhost +Connecting grant_user +Access denied for user: 'grant_user@localhost' to database 'grant_test' +drop table grant_test.test3 +show grants for grant_user@localhost +grant all on *.* to grant_user@localhost WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 2 MAX_CONNECTIONS_PER_HOUR 3 +show grants for grant_user@localhost +GRANT ALL PRIVILEGES ON *.* TO 'grant_user'@'localhost' WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 2 MAX_CONNECTIONS_PER_HOUR 3 + +revoke LOCK TABLES on *.* from grant_user@localhost +flush privileges +show grants for grant_user@localhost +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'grant_user'@'localhost' WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 2 MAX_CONNECTIONS_PER_HOUR 3 + +revoke ALL PRIVILEGES on *.* from grant_user@localhost +show grants for grant_user@localhost drop database grant_test delete from user where user='grant_user' delete from db where user='grant_user' |