REVOKE ALL PRIVILEGES, GRANT FROM user_list

is changed to a more consistent
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_list.
Bug #2642
This commit is contained in:
unknown 2004-02-15 17:59:52 +01:00
parent 4c6344ed66
commit dbcb6896de
3 changed files with 9 additions and 9 deletions

View file

@ -136,7 +136,7 @@ grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
show grants for drop_user2@localhost;
Grants for drop_user2@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user2'@'localhost' WITH GRANT OPTION
revoke all privileges, grant from drop_user2@localhost;
revoke all privileges, grant option from drop_user2@localhost;
drop user drop_user2@localhost;
grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION;
grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION;
@ -146,12 +146,12 @@ Grants for drop_user@localhost
GRANT ALL PRIVILEGES ON *.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT ALL PRIVILEGES ON `test`.* TO 'drop_user'@'localhost' WITH GRANT OPTION
GRANT SELECT (a) ON `test`.`t1` TO 'drop_user'@'localhost'
revoke all privileges, grant from drop_user@localhost;
revoke all privileges, grant option from drop_user@localhost;
show grants for drop_user@localhost;
Grants for drop_user@localhost
GRANT USAGE ON *.* TO 'drop_user'@'localhost'
drop user drop_user@localhost;
revoke all privileges, grant from drop_user@localhost;
revoke all privileges, grant option from drop_user@localhost;
ERROR HY000: Can't revoke all privileges, grant for one or more of the requested users
grant select(a) on test.t1 to drop_user1@localhost;
grant select on test.t1 to drop_user2@localhost;
@ -160,7 +160,7 @@ grant select on *.* to drop_user4@localhost;
drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
drop_user4@localhost;
ERROR HY000: Can't drop one or more of the requested users
revoke all privileges, grant from drop_user1@localhost, drop_user2@localhost,
revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost,
drop_user3@localhost, drop_user4@localhost;
drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
drop_user4@localhost;

View file

@ -100,18 +100,18 @@ select 1; -- To test that the previous command didn't cause problems
create table t1 (a int);
grant ALL PRIVILEGES on *.* to drop_user2@localhost with GRANT OPTION;
show grants for drop_user2@localhost;
revoke all privileges, grant from drop_user2@localhost;
revoke all privileges, grant option from drop_user2@localhost;
drop user drop_user2@localhost;
grant ALL PRIVILEGES on *.* to drop_user@localhost with GRANT OPTION;
grant ALL PRIVILEGES on test.* to drop_user@localhost with GRANT OPTION;
grant select(a) on test.t1 to drop_user@localhost;
show grants for drop_user@localhost;
revoke all privileges, grant from drop_user@localhost;
revoke all privileges, grant option from drop_user@localhost;
show grants for drop_user@localhost;
drop user drop_user@localhost;
--error 1268
revoke all privileges, grant from drop_user@localhost;
revoke all privileges, grant option from drop_user@localhost;
grant select(a) on test.t1 to drop_user1@localhost;
grant select on test.t1 to drop_user2@localhost;
@ -120,7 +120,7 @@ grant select on *.* to drop_user4@localhost;
--error 1267
drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
drop_user4@localhost;
revoke all privileges, grant from drop_user1@localhost, drop_user2@localhost,
revoke all privileges, grant option from drop_user1@localhost, drop_user2@localhost,
drop_user3@localhost, drop_user4@localhost;
drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost,
drop_user4@localhost;

View file

@ -5201,7 +5201,7 @@ revoke_command:
grant_privileges ON opt_table FROM user_list
{}
|
ALL PRIVILEGES ',' GRANT FROM user_list
ALL PRIVILEGES ',' GRANT OPTION FROM user_list
{
Lex->sql_command = SQLCOM_REVOKE_ALL;
}