1
# TBF - difference in row level logging
2
-- source include/have_binlog_format_mixed_or_statement.inc
3
-- source include/master-slave.inc
6
drop database if exists mysqltest1;
8
create database mysqltest1;
11
create table t1 (a int);
12
insert into t1 values(9);
13
select * from mysqltest1.t1;
14
sync_slave_with_master;
15
show databases like 'mysqltest1'; # should be empty
16
select * from test.t1;
20
drop database mysqltest1;
21
sync_slave_with_master;
25
# Option --replicate-rewrite-db should work together with LOAD DATA INFILE
30
drop database if exists rewrite;
32
create database rewrite;
36
create table t1 (a date, b date, c date not null, d date);
37
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',';
38
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
39
sync_slave_with_master;
42
select * from rewrite.t1;
46
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
47
sync_slave_with_master;
50
select * from rewrite.t1;
54
create table t1 (a text, b text);
55
load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
56
sync_slave_with_master;
59
select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
63
create table t1 (a int, b char(10));
64
load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
65
sync_slave_with_master;
68
select * from rewrite.t1;
72
load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
73
sync_slave_with_master;
76
# The empty line last comes from the end line field in the file
77
select * from rewrite.t1;
79
drop database rewrite;