diff options
Diffstat (limited to 'mysql-test/r/grant.result')
-rw-r--r-- | mysql-test/r/grant.result | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 09c2b2042b3..7d3aeb62227 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1,5 +1,4 @@ drop table if exists t1; -create table t1 (a int); delete from mysql.user where user='mysqltest_1'; delete from mysql.db where user='mysqltest_1'; flush privileges; @@ -108,4 +107,41 @@ delete from mysql.columns_priv where user='mysqltest_1'; flush privileges; drop table t1; GRANT FILE on mysqltest.* to mysqltest_1@localhost; -Wrong usage of DB GRANT and GLOBAL PRIVILEGES +ERROR HY000: Wrong usage of DB GRANT and GLOBAL PRIVILEGES +select 1; +1 +1 +create table t1 (a int); +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; +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; +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; +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; +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; +grant select on test.* to drop_user3@localhost; +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, +drop_user3@localhost, drop_user4@localhost; +drop user drop_user1@localhost, drop_user2@localhost, drop_user3@localhost, +drop_user4@localhost; +drop table t1; |