diff options
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_binlog_grant.test')
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_binlog_grant.test | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_binlog_grant.test b/mysql-test/suite/rpl/t/rpl_binlog_grant.test new file mode 100644 index 00000000..f8513021 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_grant.test @@ -0,0 +1,42 @@ +-- source include/have_innodb.inc +-- source include/not_embedded.inc +-- source include/have_binlog_format_mixed_or_statement.inc +source include/master-slave.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 + +create database d1; +use d1; +create table t (s1 int) engine=innodb; +set @@autocommit=0; +start transaction; +insert into t values (1); +create user x@y; +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; + +--source include/rpl_end.inc |