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/rpl_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_tables= master:t1, slave:t1
41
-- source include/diff_tables.inc
44
# triggers switch to row mode when on mixed
45
DELETE FROM t1 WHERE c2=1 LIMIT 1;
46
-- sync_slave_with_master
48
-- let $diff_tables= master:t1, slave:t1
49
-- source include/diff_tables.inc
53
-- sync_slave_with_master
55
-- source include/rpl_reset.inc
59
# BUG#49482: RBR: Replication may break on deletes when MyISAM tables
60
# + char field are used
62
-- eval CREATE TABLE t1 (c1 CHAR) Engine=$engine
64
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
66
UPDATE t1 SET c1=NULL WHERE c1='w';
67
-- sync_slave_with_master
69
-- let $diff_tables= master:t1, slave:t1
70
-- source include/diff_tables.inc
73
# triggers switch to row mode when on mixed
74
DELETE FROM t1 LIMIT 2;
75
-- sync_slave_with_master
77
-- let $diff_tables= master:t1, slave:t1
78
-- source include/diff_tables.inc
82
-- sync_slave_with_master