~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
stop slave;
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
3
reset master;
4
reset slave;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
6
start slave;
7
stop slave;
8
reset master;
9
reset slave;
10
reset master;
11
create table t1(n int not null auto_increment primary key)ENGINE=MyISAM;
12
insert into t1 values (NULL);
13
drop table t1;
14
create table t1 (word char(20) not null)ENGINE=MyISAM;
15
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
16
select count(*) from t1;
17
count(*)
18
69
19
show binlog events;
20
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
21
master-bin.000001	#	Format_desc	1	#	Server ver: VERSION, Binlog ver: 4
22
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
23
master-bin.000001	#	Query	1	#	use `test`; BEGIN
24
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
25
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
26
master-bin.000001	#	Query	1	#	use `test`; COMMIT
27
master-bin.000001	#	Query	1	#	use `test`; drop table t1
28
master-bin.000001	#	Query	1	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
29
master-bin.000001	#	Query	1	#	use `test`; BEGIN
30
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
31
master-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
32
master-bin.000001	#	Query	1	#	use `test`; COMMIT
33
show binlog events from 107 limit 1;
34
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
35
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
36
show binlog events from 107 limit 2;
37
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
38
master-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
39
master-bin.000001	#	Query	1	#	use `test`; BEGIN
40
show binlog events from 107 limit 2,1;
41
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
42
master-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
43
flush logs;
44
create table t3 (a int)ENGINE=MyISAM;
45
select * from t1 order by 1 asc;
46
word
47
Aarhus
48
Aaron
49
Aaron
50
Ababa
51
Ababa
52
aback
53
aback
54
abaft
55
abaft
56
abandon
57
abandon
58
abandoned
59
abandoned
60
abandoning
61
abandoning
62
abandonment
63
abandonment
64
abandons
65
abandons
66
abase
67
abased
68
abasement
69
abasements
70
abases
71
abash
72
abashed
73
abashes
74
abashing
75
abasing
76
abate
77
abated
78
abatement
79
abatements
80
abater
81
abates
82
abating
83
Abba
84
abbe
85
abbey
86
abbeys
87
abbot
88
abbots
89
Abbott
90
abbreviate
91
abbreviated
92
abbreviates
93
abbreviating
94
abbreviation
95
abbreviations
96
Abby
97
abdomen
98
abdomens
99
abdominal
100
abduct
101
abducted
102
abduction
103
abductions
104
abductor
105
abductors
106
abducts
107
Abe
108
abed
109
Abel
110
Abelian
111
Abelson
112
Aberdeen
113
Abernathy
114
aberrant
115
aberration
116
start slave;
117
118
let $result_pattern= '%127.0.0.1%root%master-bin.000002%slave-relay-bin.000005%Yes%Yes%0%0%None%' ;
119
120
--source include/wait_slave_status.inc
121
select * from t1 order by 1 asc;
122
word
123
Aarhus
124
Aaron
125
Aaron
126
Ababa
127
Ababa
128
aback
129
aback
130
abaft
131
abaft
132
abandon
133
abandon
134
abandoned
135
abandoned
136
abandoning
137
abandoning
138
abandonment
139
abandonment
140
abandons
141
abandons
142
abase
143
abased
144
abasement
145
abasements
146
abases
147
abash
148
abashed
149
abashes
150
abashing
151
abasing
152
abate
153
abated
154
abatement
155
abatements
156
abater
157
abates
158
abating
159
Abba
160
abbe
161
abbey
162
abbeys
163
abbot
164
abbots
165
Abbott
166
abbreviate
167
abbreviated
168
abbreviates
169
abbreviating
170
abbreviation
171
abbreviations
172
Abby
173
abdomen
174
abdomens
175
abdominal
176
abduct
177
abducted
178
abduction
179
abductions
180
abductor
181
abductors
182
abducts
183
Abe
184
abed
185
Abel
186
Abelian
187
Abelson
188
Aberdeen
189
Abernathy
190
aberrant
191
aberration
192
flush logs;
193
stop slave;
194
create table t2 (n int)ENGINE=MyISAM;
195
insert into t2 values (1);
196
show binlog events from <binlog_start>;
197
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
198
master-bin.000001	#	Query	#	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
199
master-bin.000001	#	Query	#	#	use `test`; BEGIN
200
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
201
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
202
master-bin.000001	#	Query	#	#	use `test`; COMMIT
203
master-bin.000001	#	Query	#	#	use `test`; drop table t1
204
master-bin.000001	#	Query	#	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
205
master-bin.000001	#	Query	#	#	use `test`; BEGIN
206
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
207
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
208
master-bin.000001	#	Query	#	#	use `test`; COMMIT
209
master-bin.000001	#	Rotate	#	#	master-bin.000002;pos=4
210
show binlog events in 'master-bin.000002';
211
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
212
master-bin.000002	#	Format_desc	1	#	Server ver: VERSION, Binlog ver: 4
213
master-bin.000002	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=MyISAM
214
master-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
215
master-bin.000002	#	Query	1	#	use `test`; BEGIN
216
master-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
217
master-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
218
master-bin.000002	#	Query	1	#	use `test`; COMMIT
219
show binary logs;
220
Log_name	File_size
221
master-bin.000001	1541
222
master-bin.000002	517
223
start slave;
224
show binary logs;
225
Log_name	File_size
226
slave-bin.000001	1639
227
slave-bin.000002	418
228
show binlog events in 'slave-bin.000001' from 4;
229
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
230
slave-bin.000001	#	Format_desc	2	#	Server ver: VERSION, Binlog ver: 4
231
slave-bin.000001	#	Query	1	#	use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
232
slave-bin.000001	#	Query	1	#	use `test`; BEGIN
233
slave-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
234
slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
235
slave-bin.000001	#	Query	1	#	use `test`; COMMIT
236
slave-bin.000001	#	Query	1	#	use `test`; drop table t1
237
slave-bin.000001	#	Query	1	#	use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
238
slave-bin.000001	#	Query	1	#	use `test`; BEGIN
239
slave-bin.000001	#	Table_map	1	#	table_id: # (test.t1)
240
slave-bin.000001	#	Write_rows	1	#	table_id: # flags: STMT_END_F
241
slave-bin.000001	#	Query	1	#	use `test`; COMMIT
242
slave-bin.000001	#	Query	1	#	use `test`; create table t3 (a int)ENGINE=MyISAM
243
slave-bin.000001	#	Rotate	2	#	slave-bin.000002;pos=4
244
show binlog events in 'slave-bin.000002' from 4;
245
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
246
slave-bin.000002	#	Format_desc	2	#	Server ver: VERSION, Binlog ver: 4
247
slave-bin.000002	#	Query	1	#	use `test`; create table t2 (n int)ENGINE=MyISAM
248
slave-bin.000002	#	Query	1	#	use `test`; BEGIN
249
slave-bin.000002	#	Table_map	1	#	table_id: # (test.t2)
250
slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
251
slave-bin.000002	#	Query	1	#	use `test`; COMMIT
252
SHOW SLAVE STATUS;
253
Slave_IO_State	#
254
Master_Host	127.0.0.1
255
Master_User	root
256
Master_Port	MASTER_PORT
257
Connect_Retry	1
258
Master_Log_File	master-bin.000002
259
Read_Master_Log_Pos	517
260
Relay_Log_File	#
261
Relay_Log_Pos	#
262
Relay_Master_Log_File	master-bin.000002
263
Slave_IO_Running	Yes
264
Slave_SQL_Running	Yes
265
Replicate_Do_DB	
266
Replicate_Ignore_DB	
267
Replicate_Do_Table	
268
Replicate_Ignore_Table	#
269
Replicate_Wild_Do_Table	
270
Replicate_Wild_Ignore_Table	
271
Last_Errno	0
272
Last_Error	
273
Skip_Counter	0
274
Exec_Master_Log_Pos	517
275
Relay_Log_Space	#
276
Until_Condition	None
277
Until_Log_File	
278
Until_Log_Pos	0
279
Master_SSL_Allowed	No
280
Master_SSL_CA_File	
281
Master_SSL_CA_Path	
282
Master_SSL_Cert	
283
Master_SSL_Cipher	
284
Master_SSL_Key	
285
Seconds_Behind_Master	#
286
Master_SSL_Verify_Server_Cert	No
287
Last_IO_Errno	#
288
Last_IO_Error	#
289
Last_SQL_Errno	0
290
Last_SQL_Error	
291
show binlog events in 'slave-bin.000005' from 4;
292
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
293
DROP TABLE t1;
294
DROP TABLE t2;
295
DROP TABLE t3;
296
create table t1(a int auto_increment primary key, b int);
297
insert into t1 values (NULL, 1);
298
reset master;
299
set insert_id=5;
300
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
301
show binlog events from <binlog_start>;
302
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
303
master-bin.000001	#	Query	#	#	use `test`; BEGIN
304
master-bin.000001	#	Table_map	#	#	table_id: # (test.t1)
305
master-bin.000001	#	Write_rows	#	#	table_id: # flags: STMT_END_F
306
master-bin.000001	#	Query	#	#	use `test`; COMMIT
307
select * from t1;
308
a	b
309
1	1
310
5	1
311
6	1
312
drop table t1;