summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2010-03-10 22:20:39 +0000
committerLuis Soares <luis.soares@sun.com>2010-03-10 22:20:39 +0000
commit9b5a6748e06a2fdb8a39b20ef65ef3afed26e6f0 (patch)
tree3a98bd3069e581facd2c97034c4e951ae85e888b /mysql-test/suite
parent2c368f050e51e867afba5152d6d5ad0aa0179edc (diff)
downloadmariadb-git-9b5a6748e06a2fdb8a39b20ef65ef3afed26e6f0.tar.gz
Fix for BUG#51716 and BUG#51787: test case improvements.
Split rpl_row_charset into: - rpl_row_utf16. - rpl_row_utf32. This way these tests can run independently if server supports either one of the charsets but not both. Cleaned up rpl_row_utf32 which had a spurious instruction: -- let $reset_slave_type_conversions= 0
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_utf16.result23
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_utf32.result (renamed from mysql-test/suite/rpl/r/rpl_row_charset.result)17
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_utf16.test26
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_utf32.test (renamed from mysql-test/suite/rpl/t/rpl_row_charset.test)26
4 files changed, 50 insertions, 42 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_row_utf16.result b/mysql-test/suite/rpl/r/rpl_row_utf16.result
new file mode 100644
index 00000000000..f7e66dd92ee
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_row_utf16.result
@@ -0,0 +1,23 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+CREATE TABLE t1(c1 CHAR(10) CHARACTER SET utf16 DEFAULT 'ola');
+INSERT INTO t1 VALUES ('abc');
+INSERT INTO t1 VALUES ();
+#### ON MASTER
+SELECT c1, hex(c1) from t1;
+c1 abc
+hex(c1) 006100620063
+c1 ola
+hex(c1) 006F006C0061
+#### ON SLAVE
+SELECT c1, hex(c1) FROM t1;
+c1 abc
+hex(c1) 006100620063
+c1 ola
+hex(c1) 006F006C0061
+Comparing tables master:test.t1 and slave:test.t1
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/r/rpl_row_charset.result b/mysql-test/suite/rpl/r/rpl_row_utf32.result
index b7ef02b93bb..e07db9c9e48 100644
--- a/mysql-test/suite/rpl/r/rpl_row_charset.result
+++ b/mysql-test/suite/rpl/r/rpl_row_utf32.result
@@ -23,20 +23,3 @@ DROP TABLE t1;
SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
include/stop_slave.inc
include/start_slave.inc
-CREATE TABLE t1(c1 CHAR(10) CHARACTER SET utf16 DEFAULT 'ola');
-INSERT INTO t1 VALUES ('abc');
-INSERT INTO t1 VALUES ();
-#### ON MASTER
-SELECT c1, hex(c1) from t1; ;
-c1 abc
-hex(c1) 006100620063
-c1 ola
-hex(c1) 006F006C0061
-#### ON SLAVE
-SELECT c1, hex(c1) FROM t1; ;
-c1 abc
-hex(c1) 006100620063
-c1 ola
-hex(c1) 006F006C0061
-Comparing tables master:test.t1 and slave:test.t1
-DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/t/rpl_row_utf16.test b/mysql-test/suite/rpl/t/rpl_row_utf16.test
new file mode 100644
index 00000000000..b8f7b724ea1
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_row_utf16.test
@@ -0,0 +1,26 @@
+-- source include/master-slave.inc
+-- source include/have_binlog_format_row.inc
+-- source include/have_utf16.inc
+
+#
+# BUG#51716: Char column with utf16 character set gives wrong padding on slave
+#
+
+CREATE TABLE t1(c1 CHAR(10) CHARACTER SET utf16 DEFAULT 'ola');
+INSERT INTO t1 VALUES ('abc'); # explicit value is inserted and encoded correctly
+INSERT INTO t1 VALUES (); # default value is inserted and encoded correctly
+
+-- echo #### ON MASTER
+--query_vertical SELECT c1, hex(c1) from t1
+
+-- sync_slave_with_master
+
+-- echo #### ON SLAVE
+--query_vertical SELECT c1, hex(c1) FROM t1
+
+# assertion: tables don't differ
+-- let $diff_table_1=master:test.t1
+-- let $diff_table_2=slave:test.t1
+-- source include/diff_tables.inc
+
+DROP TABLE t1;
diff --git a/mysql-test/suite/rpl/t/rpl_row_charset.test b/mysql-test/suite/rpl/t/rpl_row_utf32.test
index b5108541b6f..44ca4b345c0 100644
--- a/mysql-test/suite/rpl/t/rpl_row_charset.test
+++ b/mysql-test/suite/rpl/t/rpl_row_utf32.test
@@ -1,5 +1,6 @@
-- source include/master-slave.inc
-- source include/have_binlog_format_row.inc
+-- source include/have_utf32.inc
#
# BUG#51787 Assertion `(n % 4) == 0' on slave upon INSERT into a table with UTF32
@@ -11,8 +12,6 @@ SET SQL_LOG_BIN=1;
-- connection slave
--- let $reset_slave_type_conversions= 0
-
SET @saved_slave_type_conversions= @@global.slave_type_conversions;
#
@@ -43,26 +42,3 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
-- source include/stop_slave.inc
-- source include/start_slave.inc
-- connection master
-
-#
-# BUG#51716: Char column with utf16 character set gives wrong padding on slave
-#
-
-CREATE TABLE t1(c1 CHAR(10) CHARACTER SET utf16 DEFAULT 'ola');
-INSERT INTO t1 VALUES ('abc'); # explicit value is inserted and encoded correctly
-INSERT INTO t1 VALUES (); # default value is inserted and encoded correctly
-
--- echo #### ON MASTER
---query_vertical SELECT c1, hex(c1) from t1;
-
--- sync_slave_with_master
-
--- echo #### ON SLAVE
---query_vertical SELECT c1, hex(c1) FROM t1;
-
-# assertion: tables don't differ
--- let $diff_table_1=master:test.t1
--- let $diff_table_2=slave:test.t1
--- source include/diff_tables.inc
-
-DROP TABLE t1;