| 1 |
############################################################################### |
| 2 |
# Bug#18542111:ADD A TEST CASE TO TEST THE BINLOG TRANSACTION CACHE SIZE TO |
| 3 |
# 32768 |
| 4 |
# |
| 5 |
# Problem: |
| 6 |
# ======== |
| 7 |
# When the binlog's IO_CACHE grows up to exact 32768 bytes it |
| 8 |
# causes binlog events to get corrupt, if this transaction |
| 9 |
# precedes with a transaction whose IO_CACHE size is >32768. |
| 10 |
# |
| 11 |
# Test: |
| 12 |
# ===== |
| 13 |
# Create a transaction whose size is 37000 so that the event's size exceeds |
| 14 |
# 32768 and its contents are flushed to a file. Following this transaction |
| 15 |
# add a second transaction whose cache size is exactly 32768. |
| 16 |
# |
| 17 |
# During execution of third replace statement no assert should be caused. |
| 18 |
# Slave should be in sync with master. |
| 19 |
############################################################################### |
| 20 |
--source include/not_group_replication_plugin.inc |
| 21 |
--source include/have_binlog_format_row.inc |
| 22 |
--source include/master-slave.inc |
| 23 |
|
| 24 |
--connection master |
| 25 |
DROP TABLE IF EXISTS t1; |
| 26 |
CREATE TABLE t1(a varchar(40000))ENGINE=INNODB CHARACTER SET latin1; |
| 27 |
INSERT INTO t1 VALUES (REPEAT('a',37000)); |
| 28 |
INSERT INTO t1 VALUES (REPEAT('b',32543)); |
| 29 |
--source include/sync_slave_sql_with_master.inc |
| 30 |
|
| 31 |
--connection master |
| 32 |
--let $diff_tables=master:t1,slave:t1 |
| 33 |
--source include/diff_tables.inc |
| 34 |
DROP TABLE t1; |
| 35 |
|
| 36 |
--source include/rpl_end.inc |