rpl_rotate_logs.result 3.04 KB
Newer Older
unknown's avatar
unknown committed
1 2
drop table if exists t1, t2, t3, t4;
drop table if exists t1, t2, t3, t4;
3
start slave;
unknown's avatar
unknown committed
4
Got one of the listed errors
5
start slave;
6
ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
unknown's avatar
unknown committed
7
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
8
ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
unknown's avatar
unknown committed
9
reset slave;
unknown's avatar
unknown committed
10
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
unknown's avatar
unknown committed
11
reset master;
12
start slave;
13 14
create temporary table temp_table (a char(80) not null);
insert into temp_table values ("testing temporary tables");
unknown's avatar
unknown committed
15 16
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
17 18
Master_Log_File	master-bin.000001
Relay_Master_Log_File	master-bin.000001
19
Checking that both slave threads are running.
unknown's avatar
unknown committed
20
select * from t1;
21 22 23
s
Could not break slave
Tried hard
unknown's avatar
unknown committed
24
flush logs;
unknown's avatar
unknown committed
25
create table t2(m int not null auto_increment primary key);
unknown's avatar
unknown committed
26 27
insert into t2 values (34),(67),(123);
flush logs;
28
show binary logs;
29
Log_name	File_size
unknown's avatar
unknown committed
30 31 32
master-bin.000001	#
master-bin.000002	#
master-bin.000003	#
33 34 35 36 37
create table t3 select * from temp_table;
select * from t3;
a
testing temporary tables
drop table temp_table, t3;
unknown's avatar
unknown committed
38
insert into t2 values(1234);
unknown's avatar
unknown committed
39 40
set insert_id=1234;
insert into t2 values(NULL);
unknown's avatar
unknown committed
41
set global sql_slave_skip_counter=1;
42
start slave;
unknown's avatar
unknown committed
43
purge master logs to 'master-bin.000002';
44
show master logs;
unknown's avatar
unknown committed
45 46 47 48
Log_name	master-bin.000002
File_size	#
Log_name	master-bin.000003
File_size	#
49
purge binary logs to 'master-bin.000002';
unknown's avatar
unknown committed
50
show binary logs;
51
Log_name	File_size
unknown's avatar
unknown committed
52 53
master-bin.000002	#
master-bin.000003	#
54
SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND);
55
purge master logs before (@time_for_purge);
56
show binary logs;
57
Log_name	File_size
unknown's avatar
unknown committed
58
master-bin.000003	#
unknown's avatar
unknown committed
59
insert into t2 values (65);
60 61
Master_Log_File	master-bin.000003
Relay_Master_Log_File	master-bin.000003
62
Checking that both slave threads are running.
unknown's avatar
unknown committed
63
select * from t2;
64 65
m
34
66
65
67 68
67
123
69
1234
70 71
create temporary table temp_table (a char(80) not null);
insert into temp_table values ("testing temporary tables part 2");
unknown's avatar
unknown committed
72
create table t3 (n int);
73 74 75
select count(*) from t3 where n >= 4;
count(*)
100
76
create table t4 select * from temp_table;
77
show binary logs;
78
Log_name	File_size
unknown's avatar
unknown committed
79 80 81
master-bin.000003	#
master-bin.000004	#
master-bin.000005	#
unknown's avatar
unknown committed
82
show master status;
83
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
unknown's avatar
unknown committed
84
master-bin.000005	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
85 86 87
select * from t4;
a
testing temporary tables part 2
88 89
Master_Log_File	master-bin.000005
Relay_Master_Log_File	master-bin.000005
90
Checking that both slave threads are running.
unknown's avatar
unknown committed
91 92
lock tables t3 read;
select count(*) from t3 where n >= 4;
93 94
count(*)
100
unknown's avatar
unknown committed
95
unlock tables;
96
drop table if exists t1,t2,t3,t4;
97 98 99 100 101 102 103 104
End of 4.1 tests
show binlog events in 'non existing_binlog_file';
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
purge master logs before now();
show binlog events in '';
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
purge master logs before now();
End of 5.0 tests