Debian Codegraph @

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

raw
1 connect master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
2 connect slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK;
3 SET GLOBAL gtid_slave_pos= "";
4 connection slave;
5 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.");
6 start slave;
7 Got one of the listed errors
8 start slave;
9 ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
10 change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
11 ERROR HY000: Could not initialize master info structure for ''; more error messages can be found in the MariaDB error log
12 reset slave;
13 change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_ssl_verify_server_cert=0;
14 connection master;
15 reset master;
16 connection slave;
17 start slave;
18 include/wait_for_slave_to_start.inc
19 connection master;
20 create temporary table temp_table (a char(80) not null);
21 insert into temp_table values ("testing temporary tables");
22 create table t1 (s text);
23 insert into t1 values('Could not break slave'),('Tried hard');
24 connection slave;
25 Master_Log_File = 'master-bin.000001'
26 Relay_Master_Log_File = 'master-bin.000001'
27 include/check_slave_is_running.inc
28 select * from t1;
29 s
30 Could not break slave
31 Tried hard
32 connection master;
33 flush logs;
34 create table t2(m int not null auto_increment primary key);
35 insert into t2 values (34),(67),(123);
36 flush logs;
37 show binary logs;
38 Log_name File_size
39 master-bin.000001 #
40 master-bin.000002 #
41 master-bin.000003 #
42 create table t3 select * from temp_table;
43 connection slave;
44 select * from t3;
45 a
46 testing temporary tables
47 connection master;
48 drop table temp_table, t3;
49 connection slave;
50 insert into t2 values(1234);
51 connection master;
52 set insert_id=1234;
53 insert into t2 values(NULL);
54 connection slave;
55 call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* error.* 1062");
56 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
57 connection master;
58 connection slave;
59 connection master;
60 purge master logs to 'master-bin.000002';
61 show master logs;
62 Log_name master-bin.000002
63 File_size #
64 Log_name master-bin.000003
65 File_size #
66 purge binary logs to 'master-bin.000002';
67 show binary logs;
68 Log_name File_size
69 master-bin.000002 #
70 master-bin.000003 #
71 SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND);
72 purge master logs before (@time_for_purge);
73 show binary logs;
74 Log_name File_size
75 master-bin.000003 #
76 insert into t2 values (65);
77 connection slave;
78 Master_Log_File = 'master-bin.000003'
79 Relay_Master_Log_File = 'master-bin.000003'
80 include/check_slave_is_running.inc
81 select * from t2;
82 m
83 34
84 65
85 67
86 123
87 1234
88 connection master;
89 create temporary table temp_table (a char(80) not null);
90 insert into temp_table values ("testing temporary tables part 2");
91 create table t3 (n int);
92 select count(*) from t3 where n >= 4;
93 count(*)
94 103
95 create table t4 select * from temp_table;
96 show binary logs;
97 Log_name File_size
98 master-bin.000003 #
99 master-bin.000004 #
100 master-bin.000005 #
101 master-bin.000006 #
102 master-bin.000007 #
103 master-bin.000008 #
104 master-bin.000009 #
105 show master status;
106 File Position Binlog_Do_DB Binlog_Ignore_DB
107 master-bin.000009 # <Binlog_Do_DB> <Binlog_Ignore_DB>
108 connection slave;
109 select * from t4;
110 a
111 testing temporary tables part 2
112 Master_Log_File = 'master-bin.000009'
113 Relay_Master_Log_File = 'master-bin.000009'
114 include/check_slave_is_running.inc
115 lock tables t3 read;
116 select count(*) from t3 where n >= 4;
117 count(*)
118 103
119 unlock tables;
120 connection master;
121 drop table if exists t1,t2,t3,t4;
122 drop temporary table temp_table;
123 connection slave;
124 End of 4.1 tests
125 show binlog events in 'non existing_binlog_file';
126 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
127 purge master logs before now();
128 show binlog events in '';
129 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
130 purge master logs before now();
131 End of 5.0 tests
132 #cleanup
133 include/stop_slave.inc
134 reset slave all;