summaryrefslogtreecommitdiffstats
path: root/mysql-test/include/rpl_loaddata_charset.inc
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include/rpl_loaddata_charset.inc')
-rw-r--r--mysql-test/include/rpl_loaddata_charset.inc33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/include/rpl_loaddata_charset.inc b/mysql-test/include/rpl_loaddata_charset.inc
new file mode 100644
index 00000000..46a701aa
--- /dev/null
+++ b/mysql-test/include/rpl_loaddata_charset.inc
@@ -0,0 +1,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;