config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/t/rpl_binlog_grant.test

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

create database d1;
use d1;
create table t (s1 int) engine=innodb;
set @@autocommit=0;
start transaction;
insert into t values (1);
set @orig_sql_mode= @@sql_mode;
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
grant select on t to x@y;
set sql_mode= @orig_sql_mode;

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;

# Bug#81424: The proxies_priv table is not replicated
--let $rpl_connection_name= master
--source include/rpl_connection.inc

CREATE USER foo@localhost IDENTIFIED WITH 'mysql_native_password';
CREATE USER bar@localhost IDENTIFIED WITH 'mysql_native_password';

--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
--let $query= GRANT PROXY ON foo@localhost TO bar@localhost
--let $binlog_position= query_get_value("SHOW MASTER STATUS", Position, 1)
--eval $query
--let $logged_query= query_get_value(SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_position, Info, 2)
--let $assert_cond= `SELECT "$logged_query" LIKE "%GRANT PROXY%"`
--let $assert_text= Assert that the query logged is indeed the GRANT PROXY one
--source include/assert.inc

SHOW GRANTS FOR bar@localhost;

--source include/sync_slave_sql_with_master.inc

--let $rpl_connection_name= slave
--source include/rpl_connection.inc

SHOW GRANTS FOR bar@localhost;

--let $rpl_connection_name= master
--source include/rpl_connection.inc

DROP USER foo@localhost;
DROP USER bar@localhost;

--source include/sync_slave_sql_with_master.inc

--source include/rpl_end.inc

Man Man