Debian Codegraph @

mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result

raw
1 include/master-slave.inc
2 [connection master]
3 SET @@session.binlog_direct_non_transactional_updates= FALSE;
4 connection master;
5 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
6 create table tm (a int auto_increment primary key) engine=myisam;
7 create table ti (a int auto_increment primary key) engine=innodb;
8 connection slave;
9 SET @saved_dbug = @@GLOBAL.debug_dbug;
10 set @@global.debug_dbug="d,stop_slave_middle_group";
11 connection master;
12 begin;
13 insert into ti set a=null;
14 insert into tm set a=null;
15 Warnings:
16 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction
17 commit;
18 connection slave;
19 call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
20 call mtr.add_suppression("Slave SQL.*Slave SQL Thread stopped with incomplete event group having non-transactional changes");
21 include/wait_for_slave_sql_to_stop.inc
22 SELECT "NO" AS Last_SQL_Error, @check as `true`;
23 Last_SQL_Error true
24 NO 1
25 select count(*) as one from tm;
26 one
27 1
28 select count(*) as one from ti;
29 one
30 1
31 set @@global.debug_dbug=@saved_dbug;
32 include/start_slave.inc
33 connection master;
34 truncate table tm;
35 truncate table ti;
36 connection slave;
37 set @@global.debug_dbug="d,stop_slave_middle_group,incomplete_group_in_relay_log";
38 connection master;
39 begin;
40 insert into ti set a=null;
41 insert into tm set a=null;
42 Warnings:
43 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction
44 commit;
45 connection slave;
46 include/wait_for_slave_sql_error.inc [errno=1593]
47 SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
48 Last_SQL_Error true
49 Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
50 select count(*) as one from tm;
51 one
52 1
53 select count(*) as zero from ti;
54 zero
55 0
56 set @@global.debug_dbug=@saved_dbug;
57 stop slave;
58 truncate table tm;
59 include/start_slave.inc
60 connection master;
61 connection slave;
62 set @@global.debug_dbug="d,stop_slave_middle_group,incomplete_group_in_relay_log";
63 connection master;
64 update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;
65 connection slave;
66 include/wait_for_slave_sql_error.inc [errno=1593]
67 SELECT "Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details)." AS Last_SQL_Error, @check as `true`;
68 Last_SQL_Error true
69 Fatal error: ... Slave SQL Thread stopped with incomplete event group having non-transactional changes. If the group consists solely of row-based events, you can try to restart the slave with --slave-exec-mode=IDEMPOTENT, which ignores duplicate key, key not found, and similar errors (see documentation for details). 1
70 select max(a) as two from tm;
71 two
72 2
73 select max(a) as one from ti;
74 one
75 1
76 SET @@GLOBAL.debug_dbug = @saved_dbug;
77 include/rpl_reset.inc
78 connection master;
79 drop table tm, ti;
80 connection slave;
81 include/rpl_end.inc