summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/rpl_loaddata_charset.inc
blob: 46a701aa2f773dbeb1c0b5dfae9d0add5598c89f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
connection master;
--disable_warnings
DROP DATABASE IF EXISTS mysqltest;
--enable_warnings

CREATE DATABASE mysqltest CHARSET UTF8;
USE mysqltest;
CREATE TABLE t (cl varchar(100)) CHARSET UTF8;

if (!$LOAD_LOCAL)
{
  LOAD DATA INFILE '../../std_data/loaddata_utf8.dat' INTO TABLE t
  FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
}
if ($LOAD_LOCAL)
{
  LOAD DATA LOCAL INFILE './std_data/loaddata_utf8.dat' INTO TABLE t
  FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
}

save_master_pos;
SELECT hex(cl) FROM t;

connection slave;
sync_with_master;
USE mysqltest;
SELECT hex(cl) FROM t;

connection master;
DROP DATABASE mysqltest;
save_master_pos;
connection slave;
sync_with_master;