Debian Codegraph @

mysql-test/suite/rpl_nogtid/r/rpl_row_mysqlbinlog.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6
7 ---Setup Section --
8 set timestamp=1000000000;
9 DROP TABLE IF EXISTS t1,t2,t3;
10 CREATE TABLE t1(word VARCHAR(20));
11 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
12 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
13
14 ---Test1 check table load --
15 SELECT COUNT(*) from t1;
16 COUNT(*)
17 351
18 SELECT COUNT(*) from t2;
19 COUNT(*)
20 500
21 SELECT COUNT(*) from t3;
22 COUNT(*)
23 500
24 SELECT * FROM t1 ORDER BY word LIMIT 5;
25 word
26 Aarhus
27 Aarhus
28 Aarhus
29 Aarhus
30 Aarhus
31 SELECT * FROM t2 ORDER BY id LIMIT 5;
32 id
33 1
34 2
35 3
36 4
37 5
38 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
39 c1 c3 c4 c5
40 1 2006-02-22 00:00:00 Tested in Texas 2.2
41 2 2006-02-22 00:00:00 Tested in Texas 4.4
42 3 2006-02-22 00:00:00 Tested in Texas 6.6
43 4 2006-02-22 00:00:00 Tested in Texas 8.8
44 5 2006-02-22 00:00:00 Tested in Texas 11
45 SELECT COUNT(*) from t1;
46 COUNT(*)
47 351
48 SELECT COUNT(*) from t2;
49 COUNT(*)
50 500
51 SELECT COUNT(*) from t3;
52 COUNT(*)
53 500
54 SELECT * FROM t1 ORDER BY word LIMIT 5;
55 word
56 Aarhus
57 Aarhus
58 Aarhus
59 Aarhus
60 Aarhus
61 SELECT * FROM t2 ORDER BY id LIMIT 5;
62 id
63 1
64 2
65 3
66 4
67 5
68 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
69 c1 c3 c4 c5
70 1 2006-02-22 00:00:00 Tested in Texas 2.2
71 2 2006-02-22 00:00:00 Tested in Texas 4.4
72 3 2006-02-22 00:00:00 Tested in Texas 6.6
73 4 2006-02-22 00:00:00 Tested in Texas 8.8
74 5 2006-02-22 00:00:00 Tested in Texas 11
75 insert into t1 values ("Alas");
76 flush logs;
77
78 --- Test 1 Dump binlog to file --
79
80 --- Test 1 delete tables, clean master and slave --
81 DROP TABLE t1;
82 DROP TABLE t2;
83 DROP TABLE t3;
84 stop slave;
85 include/wait_for_slave_to_stop.inc
86 reset master;
87 reset slave;
88 Warnings:
89 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
90 reset master;
91 start slave;
92 Warnings:
93 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
94 include/wait_for_slave_to_start.inc
95
96 --- Test 1 Load from Dump binlog file --
97
98 --- Test 1 Check Load Results --
99 SELECT COUNT(*) from t1;
100 COUNT(*)
101 352
102 SELECT COUNT(*) from t2;
103 COUNT(*)
104 500
105 SELECT COUNT(*) from t3;
106 COUNT(*)
107 500
108 SELECT * FROM t1 ORDER BY word LIMIT 5;
109 word
110 Aarhus
111 Aarhus
112 Aarhus
113 Aarhus
114 Aarhus
115 SELECT * FROM t2 ORDER BY id LIMIT 5;
116 id
117 1
118 2
119 3
120 4
121 5
122 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
123 c1 c3 c4 c5
124 1 2006-02-22 00:00:00 Tested in Texas 2.2
125 2 2006-02-22 00:00:00 Tested in Texas 4.4
126 3 2006-02-22 00:00:00 Tested in Texas 6.6
127 4 2006-02-22 00:00:00 Tested in Texas 8.8
128 5 2006-02-22 00:00:00 Tested in Texas 11
129 SELECT COUNT(*) from t1;
130 COUNT(*)
131 352
132 SELECT COUNT(*) from t2;
133 COUNT(*)
134 500
135 SELECT COUNT(*) from t3;
136 COUNT(*)
137 500
138 SELECT * FROM t1 ORDER BY word LIMIT 5;
139 word
140 Aarhus
141 Aarhus
142 Aarhus
143 Aarhus
144 Aarhus
145 SELECT * FROM t2 ORDER BY id LIMIT 5;
146 id
147 1
148 2
149 3
150 4
151 5
152 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
153 c1 c3 c4 c5
154 1 2006-02-22 00:00:00 Tested in Texas 2.2
155 2 2006-02-22 00:00:00 Tested in Texas 4.4
156 3 2006-02-22 00:00:00 Tested in Texas 6.6
157 4 2006-02-22 00:00:00 Tested in Texas 8.8
158 5 2006-02-22 00:00:00 Tested in Texas 11
159
160 --- Test 2 position test --
161 include/mysqlbinlog.inc
162 # The proper term is pseudo_replica_mode, but we use this compatibility alias
163 # to make the statement usable on server versions 8.0.24 and older.
164 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
165 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
166 DELIMITER /*!*/;
167 ROLLBACK/*!*/;
168 # original_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
169 # immediate_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
170 /*!80001 SET @@session.original_commit_timestamp= MICROSECONDS-FROM-EPOCH*//*!*/;
171 /*!80014 SET @@session.original_server_version= ORIGINAL_SERVER_VERSION*//*!*/;
172 /*!80014 SET @@session.immediate_server_version= IMMEDIATE_SERVER_VERSION*//*!*/;
173 SET @@SESSION.GTID_NEXT= '#'/*!*/;
174 use `test`/*!*/;
175 SET TIMESTAMP=#/*!*/;
176 SET @@session.pseudo_thread_id=#/*!*/;
177 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
178 SET @@session.sql_mode=1168113696/*!*/;
179 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
180 /*!\C utf8mb4 *//*!*/;
181 SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=255/*!*/;
182 SET @@session.lc_time_names=0/*!*/;
183 SET @@session.collation_database=DEFAULT/*!*/;
184 SET @@session.explicit_defaults_for_timestamp=1/*!*/;
185 /*!80011 SET @@session.default_collation_for_utf8mb4=255*//*!*/;
186 /*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
187 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
188 /*!*/;
189 SET @@SESSION.GTID_NEXT= '#' /* added by mysqlbinlog */ /*!*/;
190 DELIMITER ;
191 # End of log file
192 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
193 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
194
195 --- Test 3 First Remote test --
196 include/mysqlbinlog.inc
197 # The proper term is pseudo_replica_mode, but we use this compatibility alias
198 # to make the statement usable on server versions 8.0.24 and older.
199 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
200 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
201 DELIMITER /*!*/;
202 ROLLBACK/*!*/;
203 # [empty]
204 # original_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
205 # immediate_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
206 /*!80001 SET @@session.original_commit_timestamp= MICROSECONDS-FROM-EPOCH*//*!*/;
207 /*!80014 SET @@session.original_server_version= ORIGINAL_SERVER_VERSION*//*!*/;
208 /*!80014 SET @@session.immediate_server_version= IMMEDIATE_SERVER_VERSION*//*!*/;
209 SET @@SESSION.GTID_NEXT= '#'/*!*/;
210 use `test`/*!*/;
211 SET TIMESTAMP=#/*!*/;
212 SET @@session.pseudo_thread_id=#/*!*/;
213 SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
214 SET @@session.sql_mode=1168113696/*!*/;
215 SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
216 /*!\C utf8mb4 *//*!*/;
217 SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=255/*!*/;
218 SET @@session.lc_time_names=0/*!*/;
219 SET @@session.collation_database=DEFAULT/*!*/;
220 /*!80011 SET @@session.default_collation_for_utf8mb4=255*//*!*/;
221 DROP TABLE IF EXISTS `t1`,`t2`,`t3` /* generated by server */
222 /*!*/;
223 # original_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
224 # immediate_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
225 /*!80001 SET @@session.original_commit_timestamp= MICROSECONDS-FROM-EPOCH*//*!*/;
226 /*!80014 SET @@session.original_server_version= ORIGINAL_SERVER_VERSION*//*!*/;
227 /*!80014 SET @@session.immediate_server_version= IMMEDIATE_SERVER_VERSION*//*!*/;
228 SET @@SESSION.GTID_NEXT= '#'/*!*/;
229 SET TIMESTAMP=#/*!*/;
230 /*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
231 CREATE TABLE t1(word VARCHAR(20))
232 /*!*/;
233 # original_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
234 # immediate_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
235 /*!80001 SET @@session.original_commit_timestamp= MICROSECONDS-FROM-EPOCH*//*!*/;
236 /*!80014 SET @@session.original_server_version= ORIGINAL_SERVER_VERSION*//*!*/;
237 /*!80014 SET @@session.immediate_server_version= IMMEDIATE_SERVER_VERSION*//*!*/;
238 SET @@SESSION.GTID_NEXT= '#'/*!*/;
239 SET TIMESTAMP=#/*!*/;
240 /*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
241 CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)
242 /*!*/;
243 # original_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
244 # immediate_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ)
245 /*!80001 SET @@session.original_commit_timestamp= MICROSECONDS-FROM-EPOCH*//*!*/;
246 /*!80014 SET @@session.original_server_version= ORIGINAL_SERVER_VERSION*//*!*/;
247 /*!80014 SET @@session.immediate_server_version= IMMEDIATE_SERVER_VERSION*//*!*/;
248 SET @@SESSION.GTID_NEXT= '#'/*!*/;
249 SET TIMESTAMP=#/*!*/;
250 SET @@session.explicit_defaults_for_timestamp=1/*!*/;
251 /*!80013 SET @@session.sql_require_primary_key=0*//*!*/;
252 CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)
253 /*!*/;
254 SET @@SESSION.GTID_NEXT= '#' /* added by mysqlbinlog */ /*!*/;
255 DELIMITER ;
256 # End of log file
257 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
258 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
259
260 --- Test 4 Second Remote test --
261 DROP TABLE t1;
262 DROP TABLE t2;
263 DROP TABLE t3;
264 stop slave;
265 include/wait_for_slave_to_stop.inc
266 reset master;
267 reset slave;
268 Warnings:
269 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
270 reset master;
271 start slave;
272 Warnings:
273 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
274 include/wait_for_slave_to_start.inc
275 SELECT COUNT(*) from t1;
276 COUNT(*)
277 352
278 SELECT COUNT(*) from t2;
279 COUNT(*)
280 500
281 SELECT COUNT(*) from t3;
282 COUNT(*)
283 500
284 SELECT * FROM t1 ORDER BY word LIMIT 5;
285 word
286 Aarhus
287 Aarhus
288 Aarhus
289 Aarhus
290 Aarhus
291 SELECT * FROM t2 ORDER BY id LIMIT 5;
292 id
293 1
294 2
295 3
296 4
297 5
298 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
299 c1 c3 c4 c5
300 1 2006-02-22 00:00:00 Tested in Texas 2.2
301 2 2006-02-22 00:00:00 Tested in Texas 4.4
302 3 2006-02-22 00:00:00 Tested in Texas 6.6
303 4 2006-02-22 00:00:00 Tested in Texas 8.8
304 5 2006-02-22 00:00:00 Tested in Texas 11
305 SELECT COUNT(*) from t1;
306 COUNT(*)
307 352
308 SELECT COUNT(*) from t2;
309 COUNT(*)
310 500
311 SELECT COUNT(*) from t3;
312 COUNT(*)
313 500
314 SELECT * FROM t1 ORDER BY word LIMIT 5;
315 word
316 Aarhus
317 Aarhus
318 Aarhus
319 Aarhus
320 Aarhus
321 SELECT * FROM t2 ORDER BY id LIMIT 5;
322 id
323 1
324 2
325 3
326 4
327 5
328 SELECT c1, c3, c4, c5 FROM t3 ORDER BY c1 LIMIT 5;
329 c1 c3 c4 c5
330 1 2006-02-22 00:00:00 Tested in Texas 2.2
331 2 2006-02-22 00:00:00 Tested in Texas 4.4
332 3 2006-02-22 00:00:00 Tested in Texas 6.6
333 4 2006-02-22 00:00:00 Tested in Texas 8.8
334 5 2006-02-22 00:00:00 Tested in Texas 11
335
336 --- Test 5 LOAD DATA --
337 include/mysqlbinlog.inc
338 # The proper term is pseudo_replica_mode, but we use this compatibility alias
339 # to make the statement usable on server versions 8.0.24 and older.
340 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
341 /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
342 DELIMITER /*!*/;
343 SET @@SESSION.GTID_NEXT= '#' /* added by mysqlbinlog */ /*!*/;
344 DELIMITER ;
345 # End of log file
346 /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
347 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
348
349 --- Test 6 reading stdin --
350 include/mysqlbinlog.inc
351
352 --- Test 7 reading stdin w/position --
353 include/mysqlbinlog.inc
354
355 --- Test 8 switch internal charset --
356 stop slave;
357 include/wait_for_slave_to_stop.inc
358 reset master;
359 reset slave;
360 Warnings:
361 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
362 reset master;
363 start slave;
364 Warnings:
365 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
366 include/wait_for_slave_to_start.inc
367 create table t4 (f text character set utf8);
368 Warnings:
369 Warning 3719 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
370 create table t5 (f text character set cp932);
371 flush logs;
372 rename table t4 to t04, t5 to t05;
373 select HEX(f) from t04;
374 HEX(f)
375 E382BD
376 select HEX(f) from t4;
377 HEX(f)
378 E382BD
379 select HEX(f) from t05;
380 HEX(f)
381 835C
382 select HEX(f) from t5;
383 HEX(f)
384 835C
385 select HEX(f) from t04;
386 HEX(f)
387 E382BD
388 select HEX(f) from t4;
389 HEX(f)
390 E382BD
391 select HEX(f) from t05;
392 HEX(f)
393 835C
394 select HEX(f) from t5;
395 HEX(f)
396 835C
397
398 --- Test cleanup --
399 DROP TABLE IF EXISTS t1;
400 CREATE TABLE t1 (a INT NOT NULL KEY, b INT);
401 INSERT INTO t1 VALUES(1,1);
402 SELECT * FROM t1;
403 a b
404 1 1
405 FLUSH LOGS;
406 DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
407 include/rpl_end.inc