| 1 |
--source include/not_embedded.inc |
| 2 |
|
| 3 |
--disable_cursor_protocol |
| 4 |
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost'; |
| 5 |
--enable_cursor_protocol |
| 6 |
|
| 7 |
--error ER_MALFORMED_DEFINER |
| 8 |
grant select on *.* to current_role; |
| 9 |
--error ER_MALFORMED_DEFINER |
| 10 |
revoke select on *.* from current_role; |
| 11 |
--error ER_MALFORMED_DEFINER |
| 12 |
revoke all, grant option from current_role; |
| 13 |
|
| 14 |
create role r1; |
| 15 |
grant insert on test.* to r1; |
| 16 |
grant r1 to current_user; |
| 17 |
set role r1; |
| 18 |
select current_role(); |
| 19 |
|
| 20 |
grant select on *.* to current_role; |
| 21 |
show grants for current_role; |
| 22 |
revoke insert on test.* from current_role; |
| 23 |
show grants for current_role; |
| 24 |
revoke all, grant option from current_role; |
| 25 |
show grants for current_role; |
| 26 |
|
| 27 |
set password=password('foobar'); |
| 28 |
show grants; |
| 29 |
grant r1 to current_user() identified by 'barfoo'; |
| 30 |
show grants; |
| 31 |
set password=''; |
| 32 |
|
| 33 |
#cleanup |
| 34 |
drop role r1; |
| 35 |
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost'; |