2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
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);
15
---Test1 check table load --
16
SELECT COUNT(*) from t1;
19
SELECT COUNT(*) from t2;
22
SELECT COUNT(*) from t3;
25
SELECT * FROM t1 ORDER BY word LIMIT 5;
32
SELECT * FROM t2 ORDER BY id LIMIT 5;
39
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
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;
49
SELECT COUNT(*) from t2;
52
SELECT COUNT(*) from t3;
55
SELECT * FROM t1 ORDER BY word LIMIT 5;
62
SELECT * FROM t2 ORDER BY id LIMIT 5;
69
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
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");
79
--- Test 1 Dump binlog to file --
81
--- Test 1 delete tables, clean master and slave --
90
--- Test 1 Load from Dump binlog file --
92
--- Test 1 Check Load Results --
93
SELECT COUNT(*) from t1;
96
SELECT COUNT(*) from t2;
99
SELECT COUNT(*) from t3;
102
SELECT * FROM t1 ORDER BY word LIMIT 5;
109
SELECT * FROM t2 ORDER BY id LIMIT 5;
116
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
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;
126
SELECT COUNT(*) from t2;
129
SELECT COUNT(*) from t3;
132
SELECT * FROM t1 ORDER BY word LIMIT 5;
139
SELECT * FROM t2 ORDER BY id LIMIT 5;
146
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
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
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*/;
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)
173
ROLLBACK /* added by mysqlbinlog */;
174
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
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*/;
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
193
SET TIMESTAMP=1000000000/*!*/;
194
CREATE TABLE t1(word VARCHAR(20))
196
SET TIMESTAMP=1000000000/*!*/;
197
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
199
SET TIMESTAMP=1000000000/*!*/;
200
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
204
ROLLBACK /* added by mysqlbinlog */;
205
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
207
--- Test 4 Second Remote test --
215
SELECT COUNT(*) from t1;
218
SELECT COUNT(*) from t2;
221
SELECT COUNT(*) from t3;
224
SELECT * FROM t1 ORDER BY word LIMIT 5;
231
SELECT * FROM t2 ORDER BY id LIMIT 5;
238
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
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;
248
SELECT COUNT(*) from t2;
251
SELECT COUNT(*) from t3;
254
SELECT * FROM t1 ORDER BY word LIMIT 5;
261
SELECT * FROM t2 ORDER BY id LIMIT 5;
268
SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
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
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*/;
282
ROLLBACK /* added by mysqlbinlog */;
283
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
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*/;
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
302
SET TIMESTAMP=1000000000/*!*/;
303
CREATE TABLE t1(word VARCHAR(20))
305
SET TIMESTAMP=1000000000/*!*/;
306
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
308
SET TIMESTAMP=1000000000/*!*/;
309
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
313
ROLLBACK /* added by mysqlbinlog */;
314
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
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*/;
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)
335
ROLLBACK /* added by mysqlbinlog */;
336
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
338
--- Test 8 switch internal charset --
343
create table t4 (f text character set utf8);
344
create table t5 (f text character set cp932);
346
rename table t4 to t04, t5 to t05;
347
select HEX(f) from t04;
350
select HEX(f) from t4;
353
select HEX(f) from t05;
356
select HEX(f) from t5;
359
select HEX(f) from t04;
362
select HEX(f) from t4;
365
select HEX(f) from t05;
368
select HEX(f) from t5;
373
DROP TABLE IF EXISTS t1;
374
CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
375
INSERT INTO t1 VALUES(1,1);
380
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;