Debian Codegraph @

mysql-test/suite/rpl/t/rpl_row_utf32.test

raw
1 -- source include/have_binlog_format_row.inc
2 -- source include/have_utf32.inc
3 -- source include/master-slave.inc
4
5 #
6 # BUG#51787 Assertion `(n % 4) == 0' on slave upon INSERT into a table with UTF32
7 #
8
9 SET SQL_LOG_BIN=0;
10 CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
11 SET SQL_LOG_BIN=1;
12
13 -- connection slave
14
15 SET @saved_slave_type_conversions= @@global.slave_type_conversions;
16
17 #
18 # Force test to cover conversion execution path in the
19 # slave, which also makes use of sql_type method, thence
20 # can ultimately trigger the assertion.
21 #
22 -- source include/stop_slave.inc
23 SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
24 -- source include/start_slave.inc
25
26 SET SQL_LOG_BIN=0;
27 CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
28 SET SQL_LOG_BIN=1;
29
30 -- connection master
31
32 INSERT INTO t1(c1) VALUES ('insert into t1');
33 DROP TABLE t1;
34
35 --sync_slave_with_master
36
37 --echo #
38 --echo # MDEV-32249 strings/ctype-ucs2.c:2336: my_vsnprintf_utf32: Assertion `(n
39 --echo #
40
41 --echo #
42 --echo # Testing with VARCHAR
43 --echo #
44
45 -- connection slave
46 -- source include/stop_slave.inc
47 SET GLOBAL SLAVE_TYPE_CONVERSIONS= '';
48 -- source include/start_slave.inc
49
50 --connection master
51 CREATE TABLE t1 (a INT);
52
53 --sync_slave_with_master
54 ALTER TABLE t1 MODIFY a VARCHAR(1) CHARACTER SET utf32;
55
56 --connection master
57 INSERT INTO t1 VALUES (1);
58
59 --connection slave
60 # ER_SLAVE_CONVERSION_FAILED
61 --let $slave_sql_errno= 1677
62 --source include/wait_for_slave_sql_error.inc
63 SHOW CREATE TABLE t1;
64 SELECT * FROM t1 ORDER BY a;
65 SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
66 START SLAVE;
67
68 --connection master
69 DROP TABLE t1;
70 --sync_slave_with_master
71
72 --echo #
73 --echo # Testing with CHAR
74 --echo #
75
76 -- connection slave
77 -- source include/stop_slave.inc
78 SET GLOBAL SLAVE_TYPE_CONVERSIONS= '';
79 -- source include/start_slave.inc
80
81 --connection master
82 CREATE TABLE t1 (a INT);
83
84 --sync_slave_with_master
85 ALTER TABLE t1 MODIFY a CHAR(1) CHARACTER SET utf32;
86
87 --connection master
88 INSERT INTO t1 VALUES (1);
89
90 --connection slave
91 # ER_SLAVE_CONVERSION_FAILED
92 --let $slave_sql_errno= 1677
93 --source include/wait_for_slave_sql_error.inc
94 SHOW CREATE TABLE t1;
95 SELECT * FROM t1 ORDER BY a;
96 SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
97 START SLAVE;
98
99 --connection master
100 DROP TABLE t1;
101 --sync_slave_with_master
102
103
104 # assertion: the slave woul hit an/several assertions:
105 # before and during slave conversion procedure
106 # Now that is fixed, it wont.
107
108 -- connection slave
109 SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
110 -- source include/stop_slave.inc
111 -- source include/start_slave.inc
112 -- connection master
113 --source include/rpl_end.inc