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
9SET SQL_LOG_BIN=0;
10CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
11SET SQL_LOG_BIN=1;
12
13-- connection slave
14
15SET @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
23SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
24-- source include/start_slave.inc
25
26SET SQL_LOG_BIN=0;
27CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
28SET SQL_LOG_BIN=1;
29
30-- connection master
31
32INSERT INTO t1(c1) VALUES ('insert into t1');
33DROP TABLE t1;
34
35--sync_slave_with_master
36
37# assertion: the slave woul hit an/several assertions:
38#            before and during slave conversion procedure
39#            Now that is fixed, it wont.
40
41SET GLOBAL SLAVE_TYPE_CONVERSIONS= @saved_slave_type_conversions;
42-- source include/stop_slave.inc
43-- source include/start_slave.inc
44-- connection master
45--source include/rpl_end.inc
46