diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 89426edb000..0b6ebe9b0ad 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -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; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 78221fa4e40..7255f872bb7 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -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; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 0e68fcc016d..84579069762 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -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; }