~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
8
---Setup Section  --
 
9
set timestamp=1000000000;
 
10
DROP TABLE IF EXISTS t1,t2,t3;
 
11
CREATE TABLE t1(word VARCHAR(20));
 
12
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
 
13
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
 
14
 
 
15
---Test1 check table load  --
 
16
SELECT COUNT(*) from t1;
 
17
COUNT(*)
 
18
351
 
19
SELECT COUNT(*) from t2;
 
20
COUNT(*)
 
21
500
 
22
SELECT COUNT(*) from t3;
 
23
COUNT(*)
 
24
500
 
25
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
26
word
 
27
Aarhus
 
28
Aarhus
 
29
Aarhus
 
30
Aarhus
 
31
Aarhus
 
32
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
33
id
 
34
1
 
35
2
 
36
3
 
37
4
 
38
5
 
39
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
40
c1      c3      c4      c5
 
41
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
42
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
43
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
44
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
45
5       2006-02-22 00:00:00     Tested in Texas 11
 
46
SELECT COUNT(*) from t1;
 
47
COUNT(*)
 
48
351
 
49
SELECT COUNT(*) from t2;
 
50
COUNT(*)
 
51
500
 
52
SELECT COUNT(*) from t3;
 
53
COUNT(*)
 
54
500
 
55
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
56
word
 
57
Aarhus
 
58
Aarhus
 
59
Aarhus
 
60
Aarhus
 
61
Aarhus
 
62
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
63
id
 
64
1
 
65
2
 
66
3
 
67
4
 
68
5
 
69
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
70
c1      c3      c4      c5
 
71
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
72
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
73
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
74
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
75
5       2006-02-22 00:00:00     Tested in Texas 11
 
76
insert into t1 values ("Alas");
 
77
flush logs;
 
78
 
 
79
--- Test 1 Dump binlog to file --
 
80
 
 
81
--- Test 1 delete tables, clean master and slave  --
 
82
DROP TABLE t1;
 
83
DROP TABLE t2;
 
84
DROP TABLE t3;
 
85
stop slave;
 
86
reset master;
 
87
reset slave;
 
88
start slave;
 
89
 
 
90
--- Test 1 Load from Dump binlog file --
 
91
 
 
92
--- Test 1 Check Load Results --
 
93
SELECT COUNT(*) from t1;
 
94
COUNT(*)
 
95
352
 
96
SELECT COUNT(*) from t2;
 
97
COUNT(*)
 
98
500
 
99
SELECT COUNT(*) from t3;
 
100
COUNT(*)
 
101
500
 
102
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
103
word
 
104
Aarhus
 
105
Aarhus
 
106
Aarhus
 
107
Aarhus
 
108
Aarhus
 
109
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
110
id
 
111
1
 
112
2
 
113
3
 
114
4
 
115
5
 
116
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
117
c1      c3      c4      c5
 
118
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
119
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
120
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
121
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
122
5       2006-02-22 00:00:00     Tested in Texas 11
 
123
SELECT COUNT(*) from t1;
 
124
COUNT(*)
 
125
352
 
126
SELECT COUNT(*) from t2;
 
127
COUNT(*)
 
128
500
 
129
SELECT COUNT(*) from t3;
 
130
COUNT(*)
 
131
500
 
132
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
133
word
 
134
Aarhus
 
135
Aarhus
 
136
Aarhus
 
137
Aarhus
 
138
Aarhus
 
139
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
140
id
 
141
1
 
142
2
 
143
3
 
144
4
 
145
5
 
146
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
147
c1      c3      c4      c5
 
148
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
149
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
150
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
151
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
152
5       2006-02-22 00:00:00     Tested in Texas 11
 
153
 
 
154
--- Test 2 position test --
 
155
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
156
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
157
DELIMITER /*!*/;
 
158
ROLLBACK/*!*/;
 
159
use test/*!*/;
 
160
SET TIMESTAMP=1000000000/*!*/;
 
161
SET @@session.pseudo_thread_id=999999999/*!*/;
 
162
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
 
163
SET @@session.sql_mode=0/*!*/;
 
164
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
165
/*!\C latin1 *//*!*/;
 
166
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
167
SET @@session.lc_time_names=0/*!*/;
 
168
SET @@session.collation_database=DEFAULT/*!*/;
 
169
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
170
/*!*/;
 
171
DELIMITER ;
 
172
# End of log file
 
173
ROLLBACK /* added by mysqlbinlog */;
 
174
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
175
 
 
176
--- Test 3 First Remote test --
 
177
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
178
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
179
DELIMITER /*!*/;
 
180
ROLLBACK/*!*/;
 
181
use test/*!*/;
 
182
SET TIMESTAMP=1000000000/*!*/;
 
183
SET @@session.pseudo_thread_id=999999999/*!*/;
 
184
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
 
185
SET @@session.sql_mode=0/*!*/;
 
186
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
187
/*!\C latin1 *//*!*/;
 
188
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
189
SET @@session.lc_time_names=0/*!*/;
 
190
SET @@session.collation_database=DEFAULT/*!*/;
 
191
DROP TABLE IF EXISTS t1,t2,t3
 
192
/*!*/;
 
193
SET TIMESTAMP=1000000000/*!*/;
 
194
CREATE TABLE t1(word VARCHAR(20))
 
195
/*!*/;
 
196
SET TIMESTAMP=1000000000/*!*/;
 
197
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
 
198
/*!*/;
 
199
SET TIMESTAMP=1000000000/*!*/;
 
200
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
201
/*!*/;
 
202
DELIMITER ;
 
203
# End of log file
 
204
ROLLBACK /* added by mysqlbinlog */;
 
205
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
206
 
 
207
--- Test 4 Second Remote test --
 
208
DROP TABLE t1;
 
209
DROP TABLE t2;
 
210
DROP TABLE t3;
 
211
stop slave;
 
212
reset master;
 
213
reset slave;
 
214
start slave;
 
215
SELECT COUNT(*) from t1;
 
216
COUNT(*)
 
217
352
 
218
SELECT COUNT(*) from t2;
 
219
COUNT(*)
 
220
500
 
221
SELECT COUNT(*) from t3;
 
222
COUNT(*)
 
223
500
 
224
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
225
word
 
226
Aarhus
 
227
Aarhus
 
228
Aarhus
 
229
Aarhus
 
230
Aarhus
 
231
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
232
id
 
233
1
 
234
2
 
235
3
 
236
4
 
237
5
 
238
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
239
c1      c3      c4      c5
 
240
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
241
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
242
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
243
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
244
5       2006-02-22 00:00:00     Tested in Texas 11
 
245
SELECT COUNT(*) from t1;
 
246
COUNT(*)
 
247
352
 
248
SELECT COUNT(*) from t2;
 
249
COUNT(*)
 
250
500
 
251
SELECT COUNT(*) from t3;
 
252
COUNT(*)
 
253
500
 
254
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
255
word
 
256
Aarhus
 
257
Aarhus
 
258
Aarhus
 
259
Aarhus
 
260
Aarhus
 
261
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
262
id
 
263
1
 
264
2
 
265
3
 
266
4
 
267
5
 
268
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
269
c1      c3      c4      c5
 
270
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
271
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
272
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
273
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
274
5       2006-02-22 00:00:00     Tested in Texas 11
 
275
 
 
276
--- Test 5 LOAD DATA --
 
277
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
278
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
279
DELIMITER /*!*/;
 
280
DELIMITER ;
 
281
# End of log file
 
282
ROLLBACK /* added by mysqlbinlog */;
 
283
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
284
 
 
285
--- Test 6 reading stdin --
 
286
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
287
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
288
DELIMITER /*!*/;
 
289
ROLLBACK/*!*/;
 
290
use test/*!*/;
 
291
SET TIMESTAMP=1000000000/*!*/;
 
292
SET @@session.pseudo_thread_id=999999999/*!*/;
 
293
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
 
294
SET @@session.sql_mode=0/*!*/;
 
295
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
296
/*!\C latin1 *//*!*/;
 
297
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
298
SET @@session.lc_time_names=0/*!*/;
 
299
SET @@session.collation_database=DEFAULT/*!*/;
 
300
DROP TABLE IF EXISTS t1,t2,t3
 
301
/*!*/;
 
302
SET TIMESTAMP=1000000000/*!*/;
 
303
CREATE TABLE t1(word VARCHAR(20))
 
304
/*!*/;
 
305
SET TIMESTAMP=1000000000/*!*/;
 
306
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
 
307
/*!*/;
 
308
SET TIMESTAMP=1000000000/*!*/;
 
309
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
310
/*!*/;
 
311
DELIMITER ;
 
312
# End of log file
 
313
ROLLBACK /* added by mysqlbinlog */;
 
314
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
315
 
 
316
--- Test 7 reading stdin w/position --
 
317
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
318
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
319
DELIMITER /*!*/;
 
320
ROLLBACK/*!*/;
 
321
use test/*!*/;
 
322
SET TIMESTAMP=1000000000/*!*/;
 
323
SET @@session.pseudo_thread_id=999999999/*!*/;
 
324
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
 
325
SET @@session.sql_mode=0/*!*/;
 
326
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
327
/*!\C latin1 *//*!*/;
 
328
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
329
SET @@session.lc_time_names=0/*!*/;
 
330
SET @@session.collation_database=DEFAULT/*!*/;
 
331
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
332
/*!*/;
 
333
DELIMITER ;
 
334
# End of log file
 
335
ROLLBACK /* added by mysqlbinlog */;
 
336
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
337
 
 
338
--- Test 8 switch internal charset --
 
339
stop slave;
 
340
reset master;
 
341
reset slave;
 
342
start slave;
 
343
create table t4 (f text character set utf8);
 
344
create table t5 (f text character set cp932);
 
345
flush logs;
 
346
rename table t4 to t04, t5 to t05;
 
347
select HEX(f) from t04;
 
348
HEX(f)
 
349
E382BD
 
350
select HEX(f) from t4;
 
351
HEX(f)
 
352
E382BD
 
353
select HEX(f) from t05;
 
354
HEX(f)
 
355
835C
 
356
select HEX(f) from t5;
 
357
HEX(f)
 
358
835C
 
359
select HEX(f) from t04;
 
360
HEX(f)
 
361
E382BD
 
362
select HEX(f) from t4;
 
363
HEX(f)
 
364
E382BD
 
365
select HEX(f) from t05;
 
366
HEX(f)
 
367
835C
 
368
select HEX(f) from t5;
 
369
HEX(f)
 
370
835C
 
371
 
 
372
--- Test cleanup --
 
373
DROP TABLE IF EXISTS t1;
 
374
CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
 
375
INSERT INTO t1 VALUES(1,1);
 
376
SELECT * FROM t1;
 
377
a       b
 
378
1       1
 
379
FLUSH LOGS;
 
380
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;