| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
create database d1; |
| 4 |
use d1; |
| 5 |
create table t (s1 int) engine=innodb; |
| 6 |
set @@autocommit=0; |
| 7 |
start transaction; |
| 8 |
insert into t values (1); |
| 9 |
create user x@y; |
| 10 |
grant select on t to x@y; |
| 11 |
rollback; |
| 12 |
show grants for x@y; |
| 13 |
Grants for x@y |
| 14 |
GRANT USAGE ON *.* TO `x`@`y` |
| 15 |
GRANT SELECT ON `d1`.`t` TO `x`@`y` |
| 16 |
start transaction; |
| 17 |
insert into t values (2); |
| 18 |
revoke select on t from x@y; |
| 19 |
commit; |
| 20 |
select * from t; |
| 21 |
s1 |
| 22 |
1 |
| 23 |
2 |
| 24 |
show grants for x@y; |
| 25 |
Grants for x@y |
| 26 |
GRANT USAGE ON *.* TO `x`@`y` |
| 27 |
drop user x@y; |
| 28 |
drop database d1; |
| 29 |
include/rpl_end.inc |