1
# Both of the following tests check that comparison of binlog BI
2
# against SE record will not fail due to remains from previous values
3
# in the SE record (before a given field was set to null).
6
# - Insert and update are executed as statements
7
# - Delete is executed as a row event
8
# - Assertion: checks that comparison will not fail because the update
9
# statement will clear the record contents for the nulled
10
# field. If data was not cleared, some engines may keep
11
# the value and return it later as garbage - despite the
12
# fact that field is null. This may cause slave to
13
# falsely fail in the comparison (memcmp would fail
14
# because of "garbage" in record data).
17
# - Insert, update and delete are executed as row events.
18
# - Assertion: checks that comparison will not fail because the update
19
# rows event will clear the record contents before
20
# feeding the new value to the SE. This protects against
21
# SEs that do not clear record contents when storing
22
# nulled fields. If the engine did not clear the data it
23
# would cause slave to falsely fail in the comparison
24
# (memcmp would fail because of "garbage" in record
25
# data). This scenario is pretty much the same described
26
# above in MIXED mode, but checks different execution
29
# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on
30
# delete cant find record
32
-- source include/master-slave-reset.inc
35
-- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine
36
INSERT INTO `t1` VALUES ( 1, 1 );
37
UPDATE t1 SET c1=NULL where c2=1;
38
-- sync_slave_with_master
40
-- let $diff_table_1=master:test.t1
41
-- let $diff_table_2=slave:test.t1
42
-- source include/diff_tables.inc
45
# triggers switch to row mode when on mixed
46
DELETE FROM t1 WHERE c2=1 LIMIT 1;
47
-- sync_slave_with_master
49
-- let $diff_table_1=master:test.t1
50
-- let $diff_table_2=slave:test.t1
51
-- source include/diff_tables.inc
55
-- sync_slave_with_master
57
-- source include/master-slave-reset.inc
61
# BUG#49482: RBR: Replication may break on deletes when MyISAM tables
62
# + char field are used
64
-- eval CREATE TABLE t1 (c1 CHAR) Engine=$engine
66
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
68
UPDATE t1 SET c1=NULL WHERE c1='w';
69
-- sync_slave_with_master
71
-- let $diff_table_1=master:test.t1
72
-- let $diff_table_2=slave:test.t1
73
-- source include/diff_tables.inc
76
# triggers switch to row mode when on mixed
77
DELETE FROM t1 LIMIT 2;
78
-- sync_slave_with_master
80
-- let $diff_table_1=master:test.t1
81
-- let $diff_table_2=slave:test.t1
82
-- source include/diff_tables.inc
86
-- sync_slave_with_master