summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_set_charset.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_set_charset.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_set_charset.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_set_charset.test b/mysql-test/suite/rpl/t/rpl_set_charset.test
new file mode 100644
index 00000000..72b89a13
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_set_charset.test
@@ -0,0 +1,30 @@
+source include/master-slave.inc;
+--disable_warnings
+drop database if exists mysqltest1;
+# 4.1 bases its conversion on the db's charset,
+# while 4.0 uses the part of "SET CHARACTER SET" after "_".
+# So for 4.1 we add a clause to CREATE DATABASE.
+create database mysqltest1 /*!40100 character set latin2 */;
+use mysqltest1;
+drop table if exists t1;
+--enable_warnings
+create table t1 (a varchar(255) character set latin2, b varchar(4));
+SET CHARACTER SET cp1250_latin2;
+INSERT INTO t1 VALUES ('','80');
+INSERT INTO t1 VALUES ('','90');
+INSERT INTO t1 VALUES ('','A0');
+INSERT INTO t1 VALUES ('','B0');
+INSERT INTO t1 VALUES ('','C0');
+INSERT INTO t1 VALUES ('','D0');
+INSERT INTO t1 VALUES ('','E0');
+INSERT INTO t1 VALUES ('','F0');
+select hex(a),b from t1 order by b;
+sync_slave_with_master;
+use mysqltest1;
+select hex(a),b from t1 order by b;
+connection master;
+drop database mysqltest1;
+sync_slave_with_master;
+
+# End of 4.1 tests
+--source include/rpl_end.inc