1#
2# Check LOAD DATA + character sets + replication
3#
4source include/master-slave.inc;
5
6#
7# Bug#15126 character_set_database is not replicated
8# (LOAD DATA INFILE need it)
9#
10connection master;
11create table t1 (a varchar(10) character set utf8);
12load data infile '../../std_data/loaddata6.dat' into table t1;
13set @@character_set_database=koi8r;
14load data infile '../../std_data/loaddata6.dat' into table t1;
15set @@character_set_database=DEFAULT;
16load data infile '../../std_data/loaddata6.dat' into table t1;
17load data infile '../../std_data/loaddata6.dat' into table t1;
18load data infile '../../std_data/loaddata6.dat' into table t1;
19set @@character_set_database=koi8r;
20load data infile '../../std_data/loaddata6.dat' into table t1;
21set @@character_set_database=DEFAULT;
22load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
23
24select hex(a) from t1;
25
26sync_slave_with_master;
27
28select hex(a) from t1;
29connection master;
30drop table t1;
31sync_slave_with_master;
32
33#
34# Bug#45516
35#   When slave SQL thread executing LOAD DATA command, the
36#   thd->variables.collation_database was not set properly to the default
37#   database charset
38#
39
40echo -------------test bug#45516------------------;
41
42# LOAD DATA INFILE
43let $LOAD_LOCAL=1;
44source include/rpl_loaddata_charset.inc;
45
46# LOAD DATA LOCAL INFILE
47let $LOAD_LOCAL=0;
48source include/rpl_loaddata_charset.inc;
49--source include/rpl_end.inc
50