Debian Codegraph @

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

raw
1 include/master-slave.inc
2 [connection master]
3 connection slave;
4 SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
5 SET @@global.innodb_flush_log_at_trx_commit= 0;
6 connection master;
7 SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
8 SET @@global.innodb_flush_log_at_trx_commit= 0;
9 SET @@session.binlog_direct_non_transactional_updates= FALSE;
10 connection master;
11 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
12 connection slave;
13 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
14 connection master;
15 create table t1(n int);
16 connection slave;
17 stop slave;
18 include/wait_for_slave_to_stop.inc
19 connection master;
20 connection slave;
21 start slave;
22 stop slave io_thread;
23 start slave io_thread;
24 include/wait_for_slave_to_start.inc
25 connection master;
26 drop table t1;
27 connection slave;
28 connection master;
29 create table t1i(n int primary key) engine=innodb;
30 create table t2m(n int primary key) engine=myisam;
31 begin;
32 insert into t1i values (1);
33 insert into t1i values (2);
34 insert into t1i values (3);
35 commit;
36 connection slave;
37 connection slave;
38 begin;
39 insert into t1i values (5);
40 connection master;
41 begin;
42 insert into t1i values (4);
43 insert into t2m values (1);
44 Warnings:
45 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
46 insert into t1i values (5);
47 commit;
48 connection slave;
49 zero
50 0
51 connection slave1;
52 stop slave;
53 connection slave;
54 rollback;
55 connection slave1;
56 include/wait_for_slave_to_stop.inc
57 *** sql thread is *not* running: No ***
58 connection master;
59 connection slave;
60 *** the prove: the stopped slave has finished the current transaction ***
61 five
62 5
63 zero
64 0
65 one
66 1
67 include/start_slave.inc
68 connection master;
69 drop table t1i, t2m;
70 connection slave;
71 #
72 # Bug#56096 STOP SLAVE hangs if executed in parallel with user sleep
73 #
74 connection master;
75 DROP TABLE IF EXISTS t1;
76 CREATE TABLE t1 (a INT );
77 connection slave;
78 connection slave1;
79 # lock table for synchronization
80 LOCK TABLES t1 WRITE;
81 connection master;
82 # insert into the table
83 INSERT INTO t1 SELECT SLEEP(4);
84 Warnings:
85 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave
86 connection slave;
87 # Slave: wait for the insert
88 # send slave stop
89 STOP SLAVE;
90 connection slave1;
91 # wait for stop slave
92 # Slave1: unlock the table
93 UNLOCK TABLES;
94 connection slave;
95 # wait for the slave to stop
96 include/wait_for_slave_to_stop.inc
97 # Start slave again
98 include/start_slave.inc
99 # Clean up
100 connection master;
101 DROP TABLE t1;
102 connection slave;
103 connection master;
104 RESET MASTER;
105 connection slave;
106 include/stop_slave.inc
107 CHANGE MASTER TO master_log_pos=MASTER_POS, master_use_gtid=no;
108 START SLAVE;
109 include/wait_for_slave_param.inc [Last_IO_Errno]
110 Last_IO_Errno = '1236'
111 Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
112 include/stop_slave_sql.inc
113 RESET SLAVE;
114 Warnings:
115 Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
116 connection master;
117 RESET MASTER;
118 connection slave;
119 SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
120 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");
121 connection master;
122 SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
123 include/rpl_end.inc