blob: a20853e35a9b56a47591c4cc81a4b2e06d0f760f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
source include/master-slave.inc;
-- source include/have_innodb.inc
-- source include/not_embedded.inc
-- source include/have_binlog_format_mixed_or_statement.inc
let $VERSION=`select version()`;
# Bug #21975: grant/revoke statements in transaction
# used to disappear from binlog upon rallback.
# Now GRANT/REVOKE do implicitly commit
# transaction
--disable_warnings
drop database if exists d1;
--enable_warnings
create database d1;
use d1;
create table t (s1 int) engine=innodb;
set @@autocommit=0;
start transaction;
insert into t values (1);
grant select on t to x@y;
let $wait_binlog_event= grant select;
source include/wait_for_binlog_event.inc;
#
# There is no active transaction here
#
rollback;
show grants for x@y;
start transaction;
insert into t values (2);
revoke select on t from x@y;
let $wait_binlog_event= revoke select;
source include/wait_for_binlog_event.inc;
#
# There is no active transaction here
#
commit;
select * from t;
show grants for x@y;
drop user x@y;
drop database d1;
--sync_slave_with_master
--source include/rpl_end.inc
|