mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl / r / rpl_row_mysqlbinlog.result
blob082ff16f1574905c650c74f77a3ae6aff6496055
1 include/master-slave.inc
2 [connection master]
4 ---Setup Section  --
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;
13 COUNT(*)
14 351
15 SELECT COUNT(*) from t2;
16 COUNT(*)
17 500
18 SELECT COUNT(*) from t3;
19 COUNT(*)
20 500
21 SELECT * FROM t1 ORDER BY word LIMIT 5;
22 word
23 Aarhus
24 Aarhus
25 Aarhus
26 Aarhus
27 Aarhus
28 SELECT * FROM t2 ORDER BY id LIMIT 5;
35 SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
36 c1      c3      c4      c5
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;
43 COUNT(*)
44 351
45 SELECT COUNT(*) from t2;
46 COUNT(*)
47 500
48 SELECT COUNT(*) from t3;
49 COUNT(*)
50 500
51 SELECT * FROM t1 ORDER BY word LIMIT 5;
52 word
53 Aarhus
54 Aarhus
55 Aarhus
56 Aarhus
57 Aarhus
58 SELECT * FROM t2 ORDER BY id LIMIT 5;
65 SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
66 c1      c3      c4      c5
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");
73 flush logs;
75 --- Test 1 Dump binlog to file --
77 --- Test 1 delete tables, clean master and slave  --
78 DROP TABLE t1;
79 DROP TABLE t2;
80 DROP TABLE t3;
81 stop slave;
82 reset master;
83 reset slave;
84 start slave;
86 --- Test 1 Load from Dump binlog file --
88 --- Test 1 Check Load Results --
89 SELECT COUNT(*) from t1;
90 COUNT(*)
91 352
92 SELECT COUNT(*) from t2;
93 COUNT(*)
94 500
95 SELECT COUNT(*) from t3;
96 COUNT(*)
97 500
98 SELECT * FROM t1 ORDER BY word LIMIT 5;
99 word
100 Aarhus
101 Aarhus
102 Aarhus
103 Aarhus
104 Aarhus
105 SELECT * FROM t2 ORDER BY id LIMIT 5;
112 SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
113 c1      c3      c4      c5
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;
120 COUNT(*)
122 SELECT COUNT(*) from t2;
123 COUNT(*)
125 SELECT COUNT(*) from t3;
126 COUNT(*)
128 SELECT * FROM t1 ORDER BY word LIMIT 5;
129 word
130 Aarhus
131 Aarhus
132 Aarhus
133 Aarhus
134 Aarhus
135 SELECT * FROM t2 ORDER BY id LIMIT 5;
142 SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
143 c1      c3      c4      c5
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*/;
154 DELIMITER /*!*/;
155 ROLLBACK/*!*/;
156 use `test`/*!*/;
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)
167 /*!*/;
168 DELIMITER ;
169 # End of log file
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*/;
176 DELIMITER /*!*/;
177 ROLLBACK/*!*/;
178 use `test`/*!*/;
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
189 /*!*/;
190 SET TIMESTAMP=1000000000/*!*/;
191 CREATE TABLE t1(word VARCHAR(20))
192 /*!*/;
193 SET TIMESTAMP=1000000000/*!*/;
194 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
195 /*!*/;
196 SET TIMESTAMP=1000000000/*!*/;
197 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
198 /*!*/;
199 DELIMITER ;
200 # End of log file
201 ROLLBACK /* added by mysqlbinlog */;
202 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
204 --- Test 4 Second Remote test --
205 DROP TABLE t1;
206 DROP TABLE t2;
207 DROP TABLE t3;
208 stop slave;
209 reset master;
210 reset slave;
211 start slave;
212 SELECT COUNT(*) from t1;
213 COUNT(*)
215 SELECT COUNT(*) from t2;
216 COUNT(*)
218 SELECT COUNT(*) from t3;
219 COUNT(*)
221 SELECT * FROM t1 ORDER BY word LIMIT 5;
222 word
223 Aarhus
224 Aarhus
225 Aarhus
226 Aarhus
227 Aarhus
228 SELECT * FROM t2 ORDER BY id LIMIT 5;
235 SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
236 c1      c3      c4      c5
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;
243 COUNT(*)
245 SELECT COUNT(*) from t2;
246 COUNT(*)
248 SELECT COUNT(*) from t3;
249 COUNT(*)
251 SELECT * FROM t1 ORDER BY word LIMIT 5;
252 word
253 Aarhus
254 Aarhus
255 Aarhus
256 Aarhus
257 Aarhus
258 SELECT * FROM t2 ORDER BY id LIMIT 5;
265 SELECT c1, c3, c4, c5  FROM t3 ORDER BY c1 LIMIT 5;
266 c1      c3      c4      c5
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*/;
276 DELIMITER /*!*/;
277 DELIMITER ;
278 # End of log file
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*/;
285 DELIMITER /*!*/;
286 ROLLBACK/*!*/;
287 use `test`/*!*/;
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
298 /*!*/;
299 SET TIMESTAMP=1000000000/*!*/;
300 CREATE TABLE t1(word VARCHAR(20))
301 /*!*/;
302 SET TIMESTAMP=1000000000/*!*/;
303 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
304 /*!*/;
305 SET TIMESTAMP=1000000000/*!*/;
306 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
307 /*!*/;
308 DELIMITER ;
309 # End of log file
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*/;
317 DELIMITER /*!*/;
318 ROLLBACK/*!*/;
319 use `test`/*!*/;
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)
330 /*!*/;
331 DELIMITER ;
332 # End of log file
333 ROLLBACK /* added by mysqlbinlog */;
334 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
336 --- Test 8 switch internal charset --
337 stop slave;
338 reset master;
339 reset slave;
340 start slave;
341 create table t4 (f text character set utf8);
342 create table t5 (f text character set cp932);
343 flush logs;
344 rename table t4 to t04, t5 to t05;
345 select HEX(f) from t04;
346 HEX(f)
347 E382BD
348 select HEX(f) from t4;
349 HEX(f)
350 E382BD
351 select HEX(f) from t05;
352 HEX(f)
353 835C
354 select HEX(f) from t5;
355 HEX(f)
356 835C
357 select HEX(f) from t04;
358 HEX(f)
359 E382BD
360 select HEX(f) from t4;
361 HEX(f)
362 E382BD
363 select HEX(f) from t05;
364 HEX(f)
365 835C
366 select HEX(f) from t5;
367 HEX(f)
368 835C
370 --- Test cleanup --
371 DROP TABLE IF EXISTS t1;
372 CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
373 INSERT INTO t1 VALUES(1,1);
374 SELECT * FROM t1;
375 a       b
376 1       1
377 FLUSH LOGS;
378 DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
379 include/rpl_end.inc