| 1 |
########################################################################## |
| 2 |
# This test verifies if a slave is able to process a "LOAD DATA INFILE" |
| 3 |
# event while the "--secure-file-priv" option is set. |
| 4 |
# |
| 5 |
# The test is divided in two steps: |
| 6 |
# 1 - Creates tables and populates them through "LOAD DATA INFILE". |
| 7 |
# 2 - Compares the master and slave. |
| 8 |
########################################################################## |
| 9 |
--source include/have_innodb.inc |
| 10 |
--source include/master-slave.inc |
| 11 |
|
| 12 |
########################################################################## |
| 13 |
# Loading data |
| 14 |
########################################################################## |
| 15 |
connection master; |
| 16 |
|
| 17 |
create table t1(a int not null auto_increment, b int, primary key(a)); |
| 18 |
create table t2(a int not null auto_increment, b int, primary key(a)) engine=innodb; |
| 19 |
|
| 20 |
load data infile '../../std_data/rpl_loaddata.dat' into table t1; |
| 21 |
|
| 22 |
start transaction; |
| 23 |
insert into t2(b) values (1); |
| 24 |
insert into t2(b) values (2); |
| 25 |
load data infile '../../std_data/rpl_loaddata.dat' into table t2; |
| 26 |
load data infile '../../std_data/rpl_loaddata.dat' into table t2; |
| 27 |
commit; |
| 28 |
|
| 29 |
########################################################################## |
| 30 |
# Checking Consistency |
| 31 |
########################################################################## |
| 32 |
sync_slave_with_master; |
| 33 |
|
| 34 |
let $diff_tables= master:t1, slave:t1; |
| 35 |
source include/diff_tables.inc; |
| 36 |
|
| 37 |
let $diff_tables= master:t2, slave:t2; |
| 38 |
source include/diff_tables.inc; |
| 39 |
|
| 40 |
########################################################################## |
| 41 |
# Clean up |
| 42 |
########################################################################## |
| 43 |
connection master; |
| 44 |
|
| 45 |
drop table t1; |
| 46 |
drop table t2; |
| 47 |
|
| 48 |
sync_slave_with_master; |
| 49 |
--source include/rpl_end.inc |