1 include/master-slave.inc
5 set timestamp=1000000000;
6 DROP TABLE IF EXISTS t1,t2,t3;
7 CREATE TABLE t1(word VARCHAR(20));
8 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
9 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
11 ---Test1 check table load --
12 SELECT COUNT(*) from t1;
15 SELECT COUNT(*) from t2;
18 SELECT COUNT(*) from t3;
21 SELECT * FROM t1 ORDER BY word LIMIT 5;
28 SELECT * FROM t2 ORDER BY id LIMIT 5;
35 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
37 1 2006-02-22 00:00:00 Tested in Texas 2.2
38 2 2006-02-22 00:00:00 Tested in Texas 4.4
39 3 2006-02-22 00:00:00 Tested in Texas 6.6
40 4 2006-02-22 00:00:00 Tested in Texas 8.8
41 5 2006-02-22 00:00:00 Tested in Texas 11
42 SELECT COUNT(*) from t1;
45 SELECT COUNT(*) from t2;
48 SELECT COUNT(*) from t3;
51 SELECT * FROM t1 ORDER BY word LIMIT 5;
58 SELECT * FROM t2 ORDER BY id LIMIT 5;
65 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
67 1 2006-02-22 00:00:00 Tested in Texas 2.2
68 2 2006-02-22 00:00:00 Tested in Texas 4.4
69 3 2006-02-22 00:00:00 Tested in Texas 6.6
70 4 2006-02-22 00:00:00 Tested in Texas 8.8
71 5 2006-02-22 00:00:00 Tested in Texas 11
72 insert into t1 values ("Alas");
75 --- Test 1 Dump binlog to file --
77 --- Test 1 delete tables, clean master and slave --
86 --- Test 1 Load from Dump binlog file --
88 --- Test 1 Check Load Results --
89 SELECT COUNT(*) from t1;
92 SELECT COUNT(*) from t2;
95 SELECT COUNT(*) from t3;
98 SELECT * FROM t1 ORDER BY word LIMIT 5;
105 SELECT * FROM t2 ORDER BY id LIMIT 5;
112 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
114 1 2006-02-22 00:00:00 Tested in Texas 2.2
115 2 2006-02-22 00:00:00 Tested in Texas 4.4
116 3 2006-02-22 00:00:00 Tested in Texas 6.6
117 4 2006-02-22 00:00:00 Tested in Texas 8.8
118 5 2006-02-22 00:00:00 Tested in Texas 11
119 SELECT COUNT(*) from t1;
122 SELECT COUNT(*) from t2;
125 SELECT COUNT(*) from t3;
128 SELECT * FROM t1 ORDER BY word LIMIT 5;
135 SELECT * FROM t2 ORDER BY id LIMIT 5;
142 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
144 1 2006-02-22 00:00:00 Tested in Texas 2.2
145 2 2006-02-22 00:00:00 Tested in Texas 4.4
146 3 2006-02-22 00:00:00 Tested in Texas 6.6
147 4 2006-02-22 00:00:00 Tested in Texas 8.8
148 5 2006-02-22 00:00:00 Tested in Texas 11
150 --- Test 2 position test --
151 Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
152 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
153 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
157 SET TIMESTAMP=1000000000/*!*/;
158 SET @@session.pseudo_thread_id=999999999/*!*/;
159 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
160 SET @@session.sql_mode=0/*!*/;
161 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
162 /*!\C latin1 *//*!*/;
163 SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
164 SET @@session.lc_time_names=0/*!*/;
165 SET @@session.collation_database=DEFAULT/*!*/;
166 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
170 ROLLBACK /* added by mysqlbinlog */;
171 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
173 --- Test 3 First Remote test --
174 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
175 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
179 SET TIMESTAMP=1000000000/*!*/;
180 SET @@session.pseudo_thread_id=999999999/*!*/;
181 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
182 SET @@session.sql_mode=0/*!*/;
183 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
184 /*!\C latin1 *//*!*/;
185 SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
186 SET @@session.lc_time_names=0/*!*/;
187 SET @@session.collation_database=DEFAULT/*!*/;
188 DROP TABLE IF EXISTS t1,t2,t3
190 SET TIMESTAMP=1000000000/*!*/;
191 CREATE TABLE t1(word VARCHAR(20))
193 SET TIMESTAMP=1000000000/*!*/;
194 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
196 SET TIMESTAMP=1000000000/*!*/;
197 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
201 ROLLBACK /* added by mysqlbinlog */;
202 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
204 --- Test 4 Second Remote test --
212 SELECT COUNT(*) from t1;
215 SELECT COUNT(*) from t2;
218 SELECT COUNT(*) from t3;
221 SELECT * FROM t1 ORDER BY word LIMIT 5;
228 SELECT * FROM t2 ORDER BY id LIMIT 5;
235 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
237 1 2006-02-22 00:00:00 Tested in Texas 2.2
238 2 2006-02-22 00:00:00 Tested in Texas 4.4
239 3 2006-02-22 00:00:00 Tested in Texas 6.6
240 4 2006-02-22 00:00:00 Tested in Texas 8.8
241 5 2006-02-22 00:00:00 Tested in Texas 11
242 SELECT COUNT(*) from t1;
245 SELECT COUNT(*) from t2;
248 SELECT COUNT(*) from t3;
251 SELECT * FROM t1 ORDER BY word LIMIT 5;
258 SELECT * FROM t2 ORDER BY id LIMIT 5;
265 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
267 1 2006-02-22 00:00:00 Tested in Texas 2.2
268 2 2006-02-22 00:00:00 Tested in Texas 4.4
269 3 2006-02-22 00:00:00 Tested in Texas 6.6
270 4 2006-02-22 00:00:00 Tested in Texas 8.8
271 5 2006-02-22 00:00:00 Tested in Texas 11
273 --- Test 5 LOAD DATA --
274 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
275 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
279 ROLLBACK /* added by mysqlbinlog */;
280 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
282 --- Test 6 reading stdin --
283 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
284 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
288 SET TIMESTAMP=1000000000/*!*/;
289 SET @@session.pseudo_thread_id=999999999/*!*/;
290 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
291 SET @@session.sql_mode=0/*!*/;
292 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
293 /*!\C latin1 *//*!*/;
294 SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
295 SET @@session.lc_time_names=0/*!*/;
296 SET @@session.collation_database=DEFAULT/*!*/;
297 DROP TABLE IF EXISTS t1,t2,t3
299 SET TIMESTAMP=1000000000/*!*/;
300 CREATE TABLE t1(word VARCHAR(20))
302 SET TIMESTAMP=1000000000/*!*/;
303 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
305 SET TIMESTAMP=1000000000/*!*/;
306 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
310 ROLLBACK /* added by mysqlbinlog */;
311 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
313 --- Test 7 reading stdin w/position --
314 Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
315 /*!40019 SET @@session.max_insert_delayed_threads=0*/;
316 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
320 SET TIMESTAMP=1000000000/*!*/;
321 SET @@session.pseudo_thread_id=999999999/*!*/;
322 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
323 SET @@session.sql_mode=0/*!*/;
324 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
325 /*!\C latin1 *//*!*/;
326 SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
327 SET @@session.lc_time_names=0/*!*/;
328 SET @@session.collation_database=DEFAULT/*!*/;
329 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
333 ROLLBACK /* added by mysqlbinlog */;
334 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
336 --- Test 8 switch internal charset --
341 create table t4 (f text character set utf8);
342 create table t5 (f text character set cp932);
344 rename table t4 to t04, t5 to t05;
345 select HEX(f) from t04;
348 select HEX(f) from t4;
351 select HEX(f) from t05;
354 select HEX(f) from t5;
357 select HEX(f) from t04;
360 select HEX(f) from t4;
363 select HEX(f) from t05;
366 select HEX(f) from t5;
371 DROP TABLE IF EXISTS t1;
372 CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
373 INSERT INTO t1 VALUES(1,1);
378 DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;