~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

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
Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
 
156
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
157
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
158
DELIMITER /*!*/;
 
159
ROLLBACK/*!*/;
 
160
use test/*!*/;
 
161
SET TIMESTAMP=1000000000/*!*/;
 
162
SET @@session.pseudo_thread_id=999999999/*!*/;
 
163
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
 
164
SET @@session.sql_mode=0/*!*/;
 
165
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
166
/*!\C latin1 *//*!*/;
 
167
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
168
SET @@session.lc_time_names=0/*!*/;
 
169
SET @@session.collation_database=DEFAULT/*!*/;
 
170
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
171
/*!*/;
 
172
DELIMITER ;
 
173
# End of log file
 
174
ROLLBACK /* added by mysqlbinlog */;
 
175
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
176
 
 
177
--- Test 3 First Remote test --
 
178
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
179
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
180
DELIMITER /*!*/;
 
181
ROLLBACK/*!*/;
 
182
use test/*!*/;
 
183
SET TIMESTAMP=1000000000/*!*/;
 
184
SET @@session.pseudo_thread_id=999999999/*!*/;
 
185
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
 
186
SET @@session.sql_mode=0/*!*/;
 
187
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
188
/*!\C latin1 *//*!*/;
 
189
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
190
SET @@session.lc_time_names=0/*!*/;
 
191
SET @@session.collation_database=DEFAULT/*!*/;
 
192
DROP TABLE IF EXISTS t1,t2,t3
 
193
/*!*/;
 
194
SET TIMESTAMP=1000000000/*!*/;
 
195
CREATE TABLE t1(word VARCHAR(20))
 
196
/*!*/;
 
197
SET TIMESTAMP=1000000000/*!*/;
 
198
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
 
199
/*!*/;
 
200
SET TIMESTAMP=1000000000/*!*/;
 
201
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
202
/*!*/;
 
203
DELIMITER ;
 
204
# End of log file
 
205
ROLLBACK /* added by mysqlbinlog */;
 
206
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
207
 
 
208
--- Test 4 Second Remote test --
 
209
DROP TABLE t1;
 
210
DROP TABLE t2;
 
211
DROP TABLE t3;
 
212
stop slave;
 
213
reset master;
 
214
reset slave;
 
215
start slave;
 
216
SELECT COUNT(*) from t1;
 
217
COUNT(*)
 
218
352
 
219
SELECT COUNT(*) from t2;
 
220
COUNT(*)
 
221
500
 
222
SELECT COUNT(*) from t3;
 
223
COUNT(*)
 
224
500
 
225
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
226
word
 
227
Aarhus
 
228
Aarhus
 
229
Aarhus
 
230
Aarhus
 
231
Aarhus
 
232
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
233
id
 
234
1
 
235
2
 
236
3
 
237
4
 
238
5
 
239
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
240
c1      c3      c4      c5
 
241
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
242
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
243
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
244
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
245
5       2006-02-22 00:00:00     Tested in Texas 11
 
246
SELECT COUNT(*) from t1;
 
247
COUNT(*)
 
248
352
 
249
SELECT COUNT(*) from t2;
 
250
COUNT(*)
 
251
500
 
252
SELECT COUNT(*) from t3;
 
253
COUNT(*)
 
254
500
 
255
SELECT * FROM t1 ORDER BY word LIMIT 5;
 
256
word
 
257
Aarhus
 
258
Aarhus
 
259
Aarhus
 
260
Aarhus
 
261
Aarhus
 
262
SELECT * FROM t2 ORDER BY id LIMIT 5;
 
263
id
 
264
1
 
265
2
 
266
3
 
267
4
 
268
5
 
269
SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
 
270
c1      c3      c4      c5
 
271
1       2006-02-22 00:00:00     Tested in Texas 2.2
 
272
2       2006-02-22 00:00:00     Tested in Texas 4.4
 
273
3       2006-02-22 00:00:00     Tested in Texas 6.6
 
274
4       2006-02-22 00:00:00     Tested in Texas 8.8
 
275
5       2006-02-22 00:00:00     Tested in Texas 11
 
276
 
 
277
--- Test 5 LOAD DATA --
 
278
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
279
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
280
DELIMITER /*!*/;
 
281
DELIMITER ;
 
282
# End of log file
 
283
ROLLBACK /* added by mysqlbinlog */;
 
284
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
285
 
 
286
--- Test 6 reading stdin --
 
287
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
288
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
289
DELIMITER /*!*/;
 
290
ROLLBACK/*!*/;
 
291
use test/*!*/;
 
292
SET TIMESTAMP=1000000000/*!*/;
 
293
SET @@session.pseudo_thread_id=999999999/*!*/;
 
294
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
 
295
SET @@session.sql_mode=0/*!*/;
 
296
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
297
/*!\C latin1 *//*!*/;
 
298
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
299
SET @@session.lc_time_names=0/*!*/;
 
300
SET @@session.collation_database=DEFAULT/*!*/;
 
301
DROP TABLE IF EXISTS t1,t2,t3
 
302
/*!*/;
 
303
SET TIMESTAMP=1000000000/*!*/;
 
304
CREATE TABLE t1(word VARCHAR(20))
 
305
/*!*/;
 
306
SET TIMESTAMP=1000000000/*!*/;
 
307
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
 
308
/*!*/;
 
309
SET TIMESTAMP=1000000000/*!*/;
 
310
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
311
/*!*/;
 
312
DELIMITER ;
 
313
# End of log file
 
314
ROLLBACK /* added by mysqlbinlog */;
 
315
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
316
 
 
317
--- Test 7 reading stdin w/position --
 
318
Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
 
319
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
 
320
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
 
321
DELIMITER /*!*/;
 
322
ROLLBACK/*!*/;
 
323
use test/*!*/;
 
324
SET TIMESTAMP=1000000000/*!*/;
 
325
SET @@session.pseudo_thread_id=999999999/*!*/;
 
326
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
 
327
SET @@session.sql_mode=0/*!*/;
 
328
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
 
329
/*!\C latin1 *//*!*/;
 
330
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
 
331
SET @@session.lc_time_names=0/*!*/;
 
332
SET @@session.collation_database=DEFAULT/*!*/;
 
333
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
 
334
/*!*/;
 
335
DELIMITER ;
 
336
# End of log file
 
337
ROLLBACK /* added by mysqlbinlog */;
 
338
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
 
339
 
 
340
--- Test 8 switch internal charset --
 
341
stop slave;
 
342
reset master;
 
343
reset slave;
 
344
start slave;
 
345
create table t4 (f text character set utf8);
 
346
create table t5 (f text character set cp932);
 
347
flush logs;
 
348
rename table t4 to t04, t5 to t05;
 
349
select HEX(f) from t04;
 
350
HEX(f)
 
351
E382BD
 
352
select HEX(f) from t4;
 
353
HEX(f)
 
354
E382BD
 
355
select HEX(f) from t05;
 
356
HEX(f)
 
357
835C
 
358
select HEX(f) from t5;
 
359
HEX(f)
 
360
835C
 
361
select HEX(f) from t04;
 
362
HEX(f)
 
363
E382BD
 
364
select HEX(f) from t4;
 
365
HEX(f)
 
366
E382BD
 
367
select HEX(f) from t05;
 
368
HEX(f)
 
369
835C
 
370
select HEX(f) from t5;
 
371
HEX(f)
 
372
835C
 
373
 
 
374
--- Test cleanup --
 
375
DROP TABLE IF EXISTS t1;
 
376
CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
 
377
INSERT INTO t1 VALUES(1,1);
 
378
SELECT * FROM t1;
 
379
a       b
 
380
1       1
 
381
FLUSH LOGS;
 
382
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;