-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathbinlog_myisam.test
51 lines (45 loc) · 1.44 KB
/
binlog_myisam.test
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
--source include/force_myisam_default.inc
--source include/have_myisam.inc
--source include/have_log_bin.inc
--source common/binlog/innodb.inc
--source include/hypergraph_is_active.inc
#
# Bug#27716 multi-update did partially and has not binlogged
#
CREATE TABLE `t1` (
`a` int(11) NOT NULL auto_increment,
`b` int(11) default NULL,
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
CREATE TABLE `t2` (
`a` int(11) NOT NULL auto_increment,
`b` int(11) default NULL,
PRIMARY KEY (`a`)
) ENGINE=INNODB DEFAULT CHARSET=latin1 ;
# A. testing multi_update::send_eof() execution branch
insert into t1 values (1,1),(2,2);
insert into t2 values (1,1),(4,4);
reset binary logs and gtids;
if ($hypergraph_is_active) {
# Hypergraph uses hash join and updates the rows in a different order.
--replace_result "'4'" "'3'"
}
--error ER_DUP_ENTRY
UPDATE t2,t1 SET t2.a=t1.a+2;
# check
select * from t2 /* must be (3,1), (4,4) */;
--echo # There must no UPDATE in binlog;
source include/rpl/deprecated/show_binlog_events.inc;
# B. testing multi_update::send_error() execution branch
delete from t1;
delete from t2;
insert into t1 values (1,2),(3,4),(4,4);
insert into t2 values (1,2),(3,4),(4,4);
reset binary logs and gtids;
--error ER_DUP_ENTRY
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
--echo # There must be no UPDATE query event;
source include/rpl/deprecated/show_binlog_events.inc;
# cleanup bug#27716
drop table t1, t2;
--echo End of tests