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_slave_load_in.test

##########################################################################
# This test verifies if a slave is able to process a "LOAD DATA INFILE"
# event while the "--secure-file-priv" option is set.
#
# The test is divided in two steps:
#    1 - Creates tables and populates them through "LOAD DATA INFILE".
#    2 - Compares the master and slave.
#
# === References ===
# Bug#28541204 SECURE-FILE-PRIV BREAKS LOAD DATA INFILE REPLICATION IN
#              STATEMENT MODE ON 5.7.23
##########################################################################

# This test does not work with var being a softlink.
--source include/not_var_link.inc
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc

# Bug#28541204 SECURE-FILE-PRIV BREAKS LOAD DATA INFILE REPLICATION IN
#              STATEMENT MODE ON 5.7.23

--echo # Restart the slave with a different secure path.
--source include/rpl_connection_slave.inc
--let $old_secure_file_path=`SELECT @@GLOBAL.secure_file_priv`
--let $datadir=`SELECT @@GLOBAL.datadir`
--let $include_silent=1
--let $rpl_server_number=2
--let $rpl_server_parameters=--secure-file-priv=$datadir
--source include/rpl_restart_server.inc
--let $include_silent=0

# Assert that @@GLOBAL.secure_file_priv equals @@GLOBAL.datadir
--let $assert_text= Datadir is the new secure file path
--let $assert_cond= "[SELECT @@GLOBAL.secure_file_priv]" = "[SELECT @@GLOBAL.datadir]"
--source include/assert.inc
--source include/start_slave.inc

##########################################################################
#                            Loading data
##########################################################################
--source include/rpl_connection_master.inc

create table t1(a int not null auto_increment, b int, primary key(a)) engine=myisam;
create table t2(a int not null auto_increment, b int, primary key(a)) engine=innodb;

load data infile '../../std_data/rpl_loaddata.dat' into table t1;

start transaction;
  insert into t2(b) values (1);
  insert into t2(b) values (2);
  load data infile '../../std_data/rpl_loaddata.dat' into table t2;
  load data infile '../../std_data/rpl_loaddata.dat' into table t2;
commit;

##########################################################################
#                       Checking Consistency
##########################################################################
--source include/sync_slave_sql_with_master.inc

--echo # Restore the old secure path on slave.
--let $include_silent=1
--let $rpl_server_number=2
--let $rpl_server_parameters=--secure-file-priv=$old_secure_file_path
--source include/rpl_restart_server.inc
--let $include_silent=0

# Assert that @@GLOBAL.secure_file_priv is restored.
--let $assert_text= Old secure file path is restored.
--let $assert_cond= "[SELECT @@GLOBAL.secure_file_priv]" = "$old_secure_file_path"
--source include/assert.inc

--source include/start_slave.inc

let $diff_tables= master:t1, slave:t1;
source include/diff_tables.inc;

let $diff_tables= master:t2, slave:t2;
source include/diff_tables.inc;

##########################################################################
#                             Clean up
##########################################################################
--source include/rpl_connection_master.inc

drop table t1;
drop table t2;

--source include/sync_slave_sql_with_master.inc
--source include/rpl_end.inc

Man Man