Debian Codegraph @

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

raw
1 include/master-slave.inc
2 [connection master]
3 include/rpl_reset.inc
4 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
5 connection slave;
6 include/stop_slave.inc
7 ==== Create some events on master ====
8 connection master;
9 create table t1(n int not null auto_increment primary key);
10 insert into t1 values (1),(2),(3),(4);
11 drop table t1;
12 create table t2(n int not null auto_increment primary key);
13 insert into t2 values (1),(2);
14 insert into t2 values (3),(4);
15 drop table t2;
16 ==== Replicate one event at a time on slave ====
17 connection slave;
18 start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS;
19 include/wait_for_slave_io_to_start.inc
20 include/wait_for_slave_sql_to_stop.inc
21 select * from t1;
22 n
23 1
24 2
25 3
26 4
27 include/check_slave_param.inc [Exec_Master_Log_Pos]
28 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
29 include/wait_for_slave_io_to_start.inc
30 include/wait_for_slave_sql_to_stop.inc
31 select * from t1;
32 n
33 1
34 2
35 3
36 4
37 include/check_slave_param.inc [Exec_Master_Log_Pos]
38 start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=RELAY_LOG_POS;
39 include/wait_for_slave_io_to_start.inc
40 include/wait_for_slave_sql_to_stop.inc
41 select * from t2;
42 n
43 1
44 2
45 include/check_slave_param.inc [Exec_Master_Log_Pos]
46 start slave;
47 connection master;
48 connection slave;
49 include/stop_slave.inc
50 start slave until master_log_file='MASTER_LOG_FILE', master_log_pos=MASTER_LOG_POS;
51 include/wait_for_slave_io_to_start.inc
52 include/wait_for_slave_sql_to_stop.inc
53 include/check_slave_param.inc [Exec_Master_Log_Pos]
54 ==== Test various error conditions ====
55 start slave until master_log_file='master-bin', master_log_pos=561;
56 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
57 start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
58 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
59 start slave until master_log_file='master-bin.000001';
60 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
61 start slave until relay_log_file='slave-relay-bin.000002';
62 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
63 start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
64 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
65 start slave sql_thread;
66 start slave until master_log_file='master-bin.000001', master_log_pos=776;
67 Warnings:
68 Note 1254 Slave is already running
69 connection slave;
70 include/stop_slave.inc
71 drop table if exists t1;
72 include/reset_slave.inc
73 Warnings:
74 Note 4190 RESET SLAVE is implicitly changing the value of 'Using_Gtid' from 'No' to 'Slave_Pos'
75 change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
76 connection master;
77 drop table if exists t1;
78 reset master;
79 create table t1 (a int primary key auto_increment);
80 connection slave;
81 start slave;
82 include/stop_slave.inc
83 master and slave are in sync now
84 select 0 as zero;
85 zero
86 0
87 connection master;
88 insert into t1 set a=null;
89 insert into t1 set a=null;
90 select count(*) as two from t1;
91 two
92 2
93 connection slave;
94 start slave until master_log_file='MASTER_LOG_FILE', master_log_pos= UNTIL_POS;;
95 include/wait_for_slave_sql_to_stop.inc
96 slave stopped at the prescribed position
97 select 0 as zero;
98 zero
99 0
100 select count(*) as one from t1;
101 one
102 1
103 connection master;
104 drop table t1;
105 connection slave;
106 start slave;
107 include/rpl_end.inc