summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl')
-rw-r--r--mysql-test/suite/rpl/r/rpl_special_charset.result8
-rw-r--r--mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result2
-rw-r--r--mysql-test/suite/rpl/t/rpl_drop_db_fail.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_special_charset.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_special_charset.test26
-rw-r--r--mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test12
6 files changed, 51 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_special_charset.result b/mysql-test/suite/rpl/r/rpl_special_charset.result
new file mode 100644
index 00000000000..99b8d3a21d1
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_special_charset.result
@@ -0,0 +1,8 @@
+include/master-slave.inc
+[connection master]
+call mtr.add_suppression("Cannot use utf16 as character_set_client");
+CREATE TABLE t1(i VARCHAR(20));
+INSERT INTO t1 VALUES (0xFFFF);
+include/diff_tables.inc [master:t1, slave:t1]
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
new file mode 100644
index 00000000000..e71bb2e29c9
--- /dev/null
+++ b/mysql-test/suite/rpl/r/show_status_stop_slave_race-7126.result
@@ -0,0 +1,2 @@
+include/master-slave.inc
+[connection master]
diff --git a/mysql-test/suite/rpl/t/rpl_drop_db_fail.test b/mysql-test/suite/rpl/t/rpl_drop_db_fail.test
index 77e6cb957f7..f4482064d7b 100644
--- a/mysql-test/suite/rpl/t/rpl_drop_db_fail.test
+++ b/mysql-test/suite/rpl/t/rpl_drop_db_fail.test
@@ -18,7 +18,9 @@ use db1;
CREATE TABLE a(id INT);
CREATE VIEW v AS SELECT * FROM a;
CREATE TABLE table_father(id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20)) ENGINE=INNODB;
+--sync_slave_with_master
+connection master;
use db2;
CREATE TABLE table_child(id INT PRIMARY KEY, info VARCHAR(20), father_id INT) ENGINE=INNODB;
ALTER TABLE table_child ADD CONSTRAINT aaa FOREIGN KEY (father_id) REFERENCES db1.table_father(id);
diff --git a/mysql-test/suite/rpl/t/rpl_special_charset.opt b/mysql-test/suite/rpl/t/rpl_special_charset.opt
new file mode 100644
index 00000000000..b071fb20845
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_special_charset.opt
@@ -0,0 +1 @@
+--character-set-server=utf16
diff --git a/mysql-test/suite/rpl/t/rpl_special_charset.test b/mysql-test/suite/rpl/t/rpl_special_charset.test
new file mode 100644
index 00000000000..8ccb1b4183f
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_special_charset.test
@@ -0,0 +1,26 @@
+################################################################################
+# Bug#19855907 IO THREAD AUTHENTICATION ISSUE WITH SOME CHARACTER SETS
+# Problem: IO thread fails to connect to master if servers are configured with
+# special character sets like utf16, utf32, ucs2.
+#
+# Analysis: MySQL server does not support few special character sets like
+# utf16,utf32 and ucs2 as "client's character set"(eg: utf16,utf32, ucs2).
+# When IO thread is trying to connect to Master, it sets server's character
+# set as client's character set. When Slave server is started with these
+# special character sets, IO thread (a connection to Master) fails because
+# of the above said reason.
+#
+# Fix: If server's character set is not supported as client's character set,
+# then set default's client character set(latin1) as client's character set.
+###############################################################################
+--source include/master-slave.inc
+call mtr.add_suppression("Cannot use utf16 as character_set_client");
+CREATE TABLE t1(i VARCHAR(20));
+INSERT INTO t1 VALUES (0xFFFF);
+--sync_slave_with_master
+--let diff_tables=master:t1, slave:t1
+--source include/diff_tables.inc
+# Cleanup
+--connection master
+DROP TABLE t1;
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
new file mode 100644
index 00000000000..a79a1885a6c
--- /dev/null
+++ b/mysql-test/suite/rpl/t/show_status_stop_slave_race-7126.test
@@ -0,0 +1,12 @@
+#
+# MDEV-7126 replication slave - deadlock in terminate_slave_thread with stop slave and show variables of replication filters and show global status
+#
+--source include/master-slave.inc
+
+--connection slave
+
+# If everything is okay, the test will end in several seconds; maybe a minute.
+# If the problem shows up, it will hang until testcase timeout is exceeded.
+--exec $MYSQL_SLAP --silent --socket=$SLAVE_MYSOCK -q "START SLAVE; STOP SLAVE; SHOW GLOBAL STATUS" -c 2 --number-of-queries=100 --create-schema=test
+
+# All done.