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