~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
drop table if exists t1, t2, t3, t4;
2
drop table if exists t1, t2, t3, t4;
3
start slave;
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
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
9
reset slave;
10
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
11
reset master;
12
start slave;
13
create temporary table temp_table (a char(80) not null);
14
insert into temp_table values ("testing temporary tables");
15
create table t1 (s text);
16
insert into t1 values('Could not break slave'),('Tried hard');
17
SHOW SLAVE STATUS;
18
Slave_IO_State	#
19
Master_Host	127.0.0.1
20
Master_User	root
21
Master_Port	MASTER_PORT
22
Connect_Retry	60
23
Master_Log_File	master-bin.000001
24
Read_Master_Log_Pos	#
25
Relay_Log_File	#
26
Relay_Log_Pos	#
27
Relay_Master_Log_File	master-bin.000001
28
Slave_IO_Running	Yes
29
Slave_SQL_Running	Yes
30
Replicate_Do_DB	
31
Replicate_Ignore_DB	
32
Replicate_Do_Table	
33
Replicate_Ignore_Table	#
34
Replicate_Wild_Do_Table	
35
Replicate_Wild_Ignore_Table	
36
Last_Errno	0
37
Last_Error	
38
Skip_Counter	0
39
Exec_Master_Log_Pos	#
40
Relay_Log_Space	#
41
Until_Condition	None
42
Until_Log_File	
43
Until_Log_Pos	0
44
Master_SSL_Allowed	No
45
Master_SSL_CA_File	
46
Master_SSL_CA_Path	
47
Master_SSL_Cert	
48
Master_SSL_Cipher	
49
Master_SSL_Key	
50
Seconds_Behind_Master	#
51
Master_SSL_Verify_Server_Cert	No
52
Last_IO_Errno	#
53
Last_IO_Error	#
54
Last_SQL_Errno	0
55
Last_SQL_Error	
56
select * from t1;
57
s
58
Could not break slave
59
Tried hard
60
flush logs;
61
create table t2(m int not null auto_increment primary key);
62
insert into t2 values (34),(67),(123);
63
flush logs;
64
show binary logs;
65
Log_name	File_size
66
master-bin.000001	#
67
master-bin.000002	#
68
master-bin.000003	#
69
create table t3 select * from temp_table;
70
select * from t3;
71
a
72
testing temporary tables
73
drop table temp_table, t3;
74
insert into t2 values(1234);
75
set insert_id=1234;
76
insert into t2 values(NULL);
77
set global sql_slave_skip_counter=1;
78
start slave;
79
purge master logs to 'master-bin.000002';
80
show master logs;
81
Log_name	master-bin.000002
82
File_size	#
83
Log_name	master-bin.000003
84
File_size	#
85
purge binary logs to 'master-bin.000002';
86
show binary logs;
87
Log_name	File_size
88
master-bin.000002	#
89
master-bin.000003	#
90
select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
91
from information_schema.tables
92
where TABLE_SCHEMA="test" and TABLE_NAME="t2";
93
purge master logs before (@time_for_purge);
94
show binary logs;
95
Log_name	File_size
96
master-bin.000003	#
97
insert into t2 values (65);
98
SHOW SLAVE STATUS;
99
Slave_IO_State	#
100
Master_Host	127.0.0.1
101
Master_User	root
102
Master_Port	MASTER_PORT
103
Connect_Retry	60
104
Master_Log_File	master-bin.000003
105
Read_Master_Log_Pos	#
106
Relay_Log_File	#
107
Relay_Log_Pos	#
108
Relay_Master_Log_File	master-bin.000003
109
Slave_IO_Running	Yes
110
Slave_SQL_Running	Yes
111
Replicate_Do_DB	
112
Replicate_Ignore_DB	
113
Replicate_Do_Table	
114
Replicate_Ignore_Table	#
115
Replicate_Wild_Do_Table	
116
Replicate_Wild_Ignore_Table	
117
Last_Errno	0
118
Last_Error	
119
Skip_Counter	0
120
Exec_Master_Log_Pos	#
121
Relay_Log_Space	#
122
Until_Condition	None
123
Until_Log_File	
124
Until_Log_Pos	0
125
Master_SSL_Allowed	No
126
Master_SSL_CA_File	
127
Master_SSL_CA_Path	
128
Master_SSL_Cert	
129
Master_SSL_Cipher	
130
Master_SSL_Key	
131
Seconds_Behind_Master	#
132
Master_SSL_Verify_Server_Cert	No
133
Last_IO_Errno	#
134
Last_IO_Error	#
135
Last_SQL_Errno	0
136
Last_SQL_Error	
137
select * from t2;
138
m
139
34
140
65
141
67
142
123
143
1234
144
create temporary table temp_table (a char(80) not null);
145
insert into temp_table values ("testing temporary tables part 2");
146
create table t3 (n int);
147
select count(*) from t3 where n >= 4;
148
count(*)
149
100
150
create table t4 select * from temp_table;
151
show binary logs;
152
Log_name	File_size
153
master-bin.000003	#
154
master-bin.000004	#
155
master-bin.000005	#
156
show master status;
157
File	Position	Binlog_Do_DB	Binlog_Ignore_DB
158
master-bin.000005	#	<Binlog_Do_DB>	<Binlog_Ignore_DB>
159
select * from t4;
160
a
161
testing temporary tables part 2
162
SHOW SLAVE STATUS;
163
Slave_IO_State	#
164
Master_Host	127.0.0.1
165
Master_User	root
166
Master_Port	MASTER_PORT
167
Connect_Retry	60
168
Master_Log_File	master-bin.000005
169
Read_Master_Log_Pos	#
170
Relay_Log_File	#
171
Relay_Log_Pos	#
172
Relay_Master_Log_File	master-bin.000005
173
Slave_IO_Running	Yes
174
Slave_SQL_Running	Yes
175
Replicate_Do_DB	
176
Replicate_Ignore_DB	
177
Replicate_Do_Table	
178
Replicate_Ignore_Table	#
179
Replicate_Wild_Do_Table	
180
Replicate_Wild_Ignore_Table	
181
Last_Errno	0
182
Last_Error	
183
Skip_Counter	0
184
Exec_Master_Log_Pos	#
185
Relay_Log_Space	#
186
Until_Condition	None
187
Until_Log_File	
188
Until_Log_Pos	0
189
Master_SSL_Allowed	No
190
Master_SSL_CA_File	
191
Master_SSL_CA_Path	
192
Master_SSL_Cert	
193
Master_SSL_Cipher	
194
Master_SSL_Key	
195
Seconds_Behind_Master	#
196
Master_SSL_Verify_Server_Cert	No
197
Last_IO_Errno	#
198
Last_IO_Error	#
199
Last_SQL_Errno	0
200
Last_SQL_Error	
201
lock tables t3 read;
202
select count(*) from t3 where n >= 4;
203
count(*)
204
100
205
unlock tables;
206
drop table if exists t1,t2,t3,t4;
207
End of 4.1 tests
208
show binlog events in 'non existing_binlog_file';
209
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
210
purge master logs before now();
211
show binlog events in '';
212
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
213
purge master logs before now();
214
End of 5.0 tests