summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-09-15 12:25:06 +0400
committerAlexander Barkov <bar@mariadb.org>2017-09-15 12:25:06 +0400
commit434e283507e5e73d6b3873fff50daddb99cea4d6 (patch)
tree8a20fb10855bd57e7e9b24732eb40e01b11e47cc /mysql-test/suite
parent65c94238f8651d596f78bc86ae680f31ca65b280 (diff)
downloadmariadb-git-434e283507e5e73d6b3873fff50daddb99cea4d6.tar.gz
MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp_variables.result24
-rw-r--r--mysql-test/suite/rpl/t/rpl_sp_variables.test28
2 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_sp_variables.result b/mysql-test/suite/rpl/r/rpl_sp_variables.result
new file mode 100644
index 00000000000..d64bc1a80f0
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_sp_variables.result
@@ -0,0 +1,24 @@
+include/master-slave.inc
+[connection master]
+#
+# MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
+#
+SET NAMES utf8;
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
+CREATE PROCEDURE p1()
+BEGIN
+DECLARE v_id INT DEFAULT 2017;
+INSERT INTO test.t1 SELECT CONCAT(v_id, '오');
+END;
+$$
+CALL p1;
+SELECT * FROM t1;
+a
+2017오
+SET NAMES utf8;
+SELECT * FROM t1;
+a
+2017오
+DROP PROCEDURE p1;
+DROP TABLE t1;
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_sp_variables.test b/mysql-test/suite/rpl/t/rpl_sp_variables.test
new file mode 100644
index 00000000000..87e9fe194ea
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_sp_variables.test
@@ -0,0 +1,28 @@
+source include/master-slave.inc;
+
+--echo #
+--echo # MDEV-13685 Can not replay binary log due to Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation 'concat'
+--echo #
+
+connection master;
+SET NAMES utf8;
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
+DELIMITER $$;
+CREATE PROCEDURE p1()
+BEGIN
+ DECLARE v_id INT DEFAULT 2017;
+ INSERT INTO test.t1 SELECT CONCAT(v_id, '오');
+END;
+$$
+DELIMITER ;$$
+CALL p1;
+SELECT * FROM t1;
+sync_slave_with_master;
+SET NAMES utf8;
+SELECT * FROM t1;
+connection master;
+DROP PROCEDURE p1;
+DROP TABLE t1;
+sync_slave_with_master;
+
+--source include/rpl_end.inc