Debian Codegraph @

mysql-test/suite/ndb_rpl/r/log_transaction_dependency_with_indexes.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 #### INITIALIZE ####
7 [connection slave]
8 include/stop_slave.inc
9 SET @save_replica_parallel_workers= @@GLOBAL.replica_parallel_workers;
10 SET @@GLOBAL.replica_parallel_workers= 4;
11 include/start_slave.inc
12 [connection master]
13 SET @save_binlog_transaction_dependency_tracking = @@GLOBAL.binlog_transaction_dependency_tracking;
14 Warnings:
15 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
16 SET GLOBAL binlog_transaction_dependency_tracking = COMMIT_ORDER;
17 Warnings:
18 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
19 SET GLOBAL binlog_transaction_dependency_tracking = WRITESET;
20 Warnings:
21 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
22
23 #### 0.0.0.0: WITHOUT PK, NULLABLE, NOT UNIQUE, NO INDEX ####
24
25 CREATE TABLE t1 (
26 a INT,
27 b INT ,
28 c INT
29 ) engine = NDB;
30 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
31 FLUSH LOGS;
32 include/save_binlog_position.inc
33 # TRX1: independent
34 INSERT INTO t1 VALUES (1, 1, 1);
35 # Wait for ndb_binlog thread...
36 # now t1 contains one row: (1, 1, 1)
37 include/include/assert_logical_timestamps.inc [0 1]
38 # TRX2: independent
39 BEGIN;
40 INSERT INTO t1 VALUES (2, 2, 2);
41 INSERT INTO t2 VALUES (1);
42 COMMIT;
43 # Wait for ndb_binlog thread...
44 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
45 include/include/assert_logical_timestamps.inc [1 2]
46 # TRX3: independent
47 INSERT INTO t2 VALUES (3);
48 # Wait for ndb_binlog thread...
49 # TRX4: depends on TRX2
50 DELETE FROM t1 WHERE a = 2;
51 # Wait for ndb_binlog thread...
52 # now t1 contains one row: (1, 1, 1)
53 include/include/assert_logical_timestamps.inc [1 3;3 4]
54 # TRX5: independent
55 INSERT INTO t2 VALUES (5);
56 # Wait for ndb_binlog thread...
57 # TRX6: conflict with TRX4 if unique, else with TRX1
58 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
59 # Wait for ndb_binlog thread...
60 # now t1 contains one row: (1, 2, 2)
61 include/include/assert_logical_timestamps.inc [1 5;5 6]
62 # TRX7: independent
63 INSERT INTO t1 VALUES (3, NULL, 2);
64 # Wait for ndb_binlog thread...
65 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
66 include/include/assert_logical_timestamps.inc [6 7]
67 # TRX8: independent
68 INSERT INTO t2 VALUES (8);
69 # Wait for ndb_binlog thread...
70 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
71 INSERT INTO t1 VALUES (4, NULL, 2);
72 # Wait for ndb_binlog thread...
73 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
74 include/include/assert_logical_timestamps.inc [1 8;8 9]
75 # TRX10: independent
76 INSERT INTO t2 VALUES (10);
77 # Wait for ndb_binlog thread...
78 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
79 DELETE FROM t1 WHERE a = 3;
80 # Wait for ndb_binlog thread...
81 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
82 include/include/assert_logical_timestamps.inc [1 10;10 11]
83 DROP TABLE t1;
84 DROP TABLE t2;
85
86 #### 0.0.0.1: WITHOUT PK, NULLABLE, NOT UNIQUE, 1-COLUMN INDEX ####
87
88 CREATE TABLE t1 (
89 a INT,
90 b INT ,
91 c INT , INDEX(b)
92 ) engine = NDB;
93 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
94 FLUSH LOGS;
95 include/save_binlog_position.inc
96 # TRX1: independent
97 INSERT INTO t1 VALUES (1, 1, 1);
98 # Wait for ndb_binlog thread...
99 # now t1 contains one row: (1, 1, 1)
100 include/include/assert_logical_timestamps.inc [0 1]
101 # TRX2: independent
102 BEGIN;
103 INSERT INTO t1 VALUES (2, 2, 2);
104 INSERT INTO t2 VALUES (1);
105 COMMIT;
106 # Wait for ndb_binlog thread...
107 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
108 include/include/assert_logical_timestamps.inc [1 2]
109 # TRX3: independent
110 INSERT INTO t2 VALUES (3);
111 # Wait for ndb_binlog thread...
112 # TRX4: depends on TRX2
113 DELETE FROM t1 WHERE a = 2;
114 # Wait for ndb_binlog thread...
115 # now t1 contains one row: (1, 1, 1)
116 include/include/assert_logical_timestamps.inc [1 3;3 4]
117 # TRX5: independent
118 INSERT INTO t2 VALUES (5);
119 # Wait for ndb_binlog thread...
120 # TRX6: conflict with TRX4 if unique, else with TRX1
121 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
122 # Wait for ndb_binlog thread...
123 # now t1 contains one row: (1, 2, 2)
124 include/include/assert_logical_timestamps.inc [1 5;5 6]
125 # TRX7: independent
126 INSERT INTO t1 VALUES (3, NULL, 2);
127 # Wait for ndb_binlog thread...
128 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
129 include/include/assert_logical_timestamps.inc [6 7]
130 # TRX8: independent
131 INSERT INTO t2 VALUES (8);
132 # Wait for ndb_binlog thread...
133 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
134 INSERT INTO t1 VALUES (4, NULL, 2);
135 # Wait for ndb_binlog thread...
136 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
137 include/include/assert_logical_timestamps.inc [1 8;8 9]
138 # TRX10: independent
139 INSERT INTO t2 VALUES (10);
140 # Wait for ndb_binlog thread...
141 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
142 DELETE FROM t1 WHERE a = 3;
143 # Wait for ndb_binlog thread...
144 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
145 include/include/assert_logical_timestamps.inc [1 10;10 11]
146 DROP TABLE t1;
147 DROP TABLE t2;
148
149 #### 0.0.0.2: WITHOUT PK, NULLABLE, NOT UNIQUE, 2-COLUMN INDEX ####
150
151 CREATE TABLE t1 (
152 a INT,
153 b INT ,
154 c INT , INDEX(b, c)
155 ) engine = NDB;
156 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
157 FLUSH LOGS;
158 include/save_binlog_position.inc
159 # TRX1: independent
160 INSERT INTO t1 VALUES (1, 1, 1);
161 # Wait for ndb_binlog thread...
162 # now t1 contains one row: (1, 1, 1)
163 include/include/assert_logical_timestamps.inc [0 1]
164 # TRX2: independent
165 BEGIN;
166 INSERT INTO t1 VALUES (2, 2, 2);
167 INSERT INTO t2 VALUES (1);
168 COMMIT;
169 # Wait for ndb_binlog thread...
170 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
171 include/include/assert_logical_timestamps.inc [1 2]
172 # TRX3: independent
173 INSERT INTO t2 VALUES (3);
174 # Wait for ndb_binlog thread...
175 # TRX4: depends on TRX2
176 DELETE FROM t1 WHERE a = 2;
177 # Wait for ndb_binlog thread...
178 # now t1 contains one row: (1, 1, 1)
179 include/include/assert_logical_timestamps.inc [1 3;3 4]
180 # TRX5: independent
181 INSERT INTO t2 VALUES (5);
182 # Wait for ndb_binlog thread...
183 # TRX6: conflict with TRX4 if unique, else with TRX1
184 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
185 # Wait for ndb_binlog thread...
186 # now t1 contains one row: (1, 2, 2)
187 include/include/assert_logical_timestamps.inc [1 5;5 6]
188 # TRX7: independent
189 INSERT INTO t1 VALUES (3, NULL, 2);
190 # Wait for ndb_binlog thread...
191 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
192 include/include/assert_logical_timestamps.inc [6 7]
193 # TRX8: independent
194 INSERT INTO t2 VALUES (8);
195 # Wait for ndb_binlog thread...
196 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
197 INSERT INTO t1 VALUES (4, NULL, 2);
198 # Wait for ndb_binlog thread...
199 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
200 include/include/assert_logical_timestamps.inc [1 8;8 9]
201 # TRX10: independent
202 INSERT INTO t2 VALUES (10);
203 # Wait for ndb_binlog thread...
204 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
205 DELETE FROM t1 WHERE a = 3;
206 # Wait for ndb_binlog thread...
207 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
208 include/include/assert_logical_timestamps.inc [1 10;10 11]
209 DROP TABLE t1;
210 DROP TABLE t2;
211
212 #### 0.0.1.1: WITHOUT PK, NULLABLE, UNIQUE, 1-COLUMN INDEX ####
213
214 CREATE TABLE t1 (
215 a INT,
216 b INT ,
217 c INT , UNIQUE INDEX(b)
218 ) engine = NDB;
219 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
220 FLUSH LOGS;
221 include/save_binlog_position.inc
222 # TRX1: independent
223 INSERT INTO t1 VALUES (1, 1, 1);
224 # Wait for ndb_binlog thread...
225 # now t1 contains one row: (1, 1, 1)
226 include/include/assert_logical_timestamps.inc [0 1]
227 # TRX2: independent
228 BEGIN;
229 INSERT INTO t1 VALUES (2, 2, 2);
230 INSERT INTO t2 VALUES (1);
231 COMMIT;
232 # Wait for ndb_binlog thread...
233 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
234 include/include/assert_logical_timestamps.inc [1 2]
235 # TRX3: independent
236 INSERT INTO t2 VALUES (3);
237 # Wait for ndb_binlog thread...
238 # TRX4: depends on TRX2
239 DELETE FROM t1 WHERE a = 2;
240 # Wait for ndb_binlog thread...
241 # now t1 contains one row: (1, 1, 1)
242 include/include/assert_logical_timestamps.inc [1 3;3 4]
243 # TRX5: independent
244 INSERT INTO t2 VALUES (5);
245 # Wait for ndb_binlog thread...
246 # TRX6: conflict with TRX4 if unique, else with TRX1
247 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
248 # Wait for ndb_binlog thread...
249 # now t1 contains one row: (1, 2, 2)
250 include/include/assert_logical_timestamps.inc [1 5;5 6]
251 # TRX7: independent
252 INSERT INTO t1 VALUES (3, NULL, 2);
253 # Wait for ndb_binlog thread...
254 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
255 include/include/assert_logical_timestamps.inc [6 7]
256 # TRX8: independent
257 INSERT INTO t2 VALUES (8);
258 # Wait for ndb_binlog thread...
259 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
260 INSERT INTO t1 VALUES (4, NULL, 2);
261 # Wait for ndb_binlog thread...
262 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
263 include/include/assert_logical_timestamps.inc [1 8;8 9]
264 # TRX10: independent
265 INSERT INTO t2 VALUES (10);
266 # Wait for ndb_binlog thread...
267 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
268 DELETE FROM t1 WHERE a = 3;
269 # Wait for ndb_binlog thread...
270 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
271 include/include/assert_logical_timestamps.inc [1 10;10 11]
272 DROP TABLE t1;
273 DROP TABLE t2;
274
275 #### 0.0.1.2: WITHOUT PK, NULLABLE, UNIQUE, 2-COLUMN INDEX ####
276
277 CREATE TABLE t1 (
278 a INT,
279 b INT ,
280 c INT , UNIQUE INDEX(b, c)
281 ) engine = NDB;
282 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
283 FLUSH LOGS;
284 include/save_binlog_position.inc
285 # TRX1: independent
286 INSERT INTO t1 VALUES (1, 1, 1);
287 # Wait for ndb_binlog thread...
288 # now t1 contains one row: (1, 1, 1)
289 include/include/assert_logical_timestamps.inc [0 1]
290 # TRX2: independent
291 BEGIN;
292 INSERT INTO t1 VALUES (2, 2, 2);
293 INSERT INTO t2 VALUES (1);
294 COMMIT;
295 # Wait for ndb_binlog thread...
296 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
297 include/include/assert_logical_timestamps.inc [1 2]
298 # TRX3: independent
299 INSERT INTO t2 VALUES (3);
300 # Wait for ndb_binlog thread...
301 # TRX4: depends on TRX2
302 DELETE FROM t1 WHERE a = 2;
303 # Wait for ndb_binlog thread...
304 # now t1 contains one row: (1, 1, 1)
305 include/include/assert_logical_timestamps.inc [1 3;3 4]
306 # TRX5: independent
307 INSERT INTO t2 VALUES (5);
308 # Wait for ndb_binlog thread...
309 # TRX6: conflict with TRX4 if unique, else with TRX1
310 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
311 # Wait for ndb_binlog thread...
312 # now t1 contains one row: (1, 2, 2)
313 include/include/assert_logical_timestamps.inc [1 5;5 6]
314 # TRX7: independent
315 INSERT INTO t1 VALUES (3, NULL, 2);
316 # Wait for ndb_binlog thread...
317 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
318 include/include/assert_logical_timestamps.inc [6 7]
319 # TRX8: independent
320 INSERT INTO t2 VALUES (8);
321 # Wait for ndb_binlog thread...
322 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
323 INSERT INTO t1 VALUES (4, NULL, 2);
324 # Wait for ndb_binlog thread...
325 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
326 include/include/assert_logical_timestamps.inc [1 8;8 9]
327 # TRX10: independent
328 INSERT INTO t2 VALUES (10);
329 # Wait for ndb_binlog thread...
330 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
331 DELETE FROM t1 WHERE a = 3;
332 # Wait for ndb_binlog thread...
333 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
334 include/include/assert_logical_timestamps.inc [1 10;10 11]
335 DROP TABLE t1;
336 DROP TABLE t2;
337
338 #### 0.1.0.0: WITHOUT PK, NOT NULL, NOT UNIQUE, NO INDEX ####
339
340 CREATE TABLE t1 (
341 a INT,
342 b INT NOT NULL,
343 c INT NOT NULL
344 ) engine = NDB;
345 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
346 FLUSH LOGS;
347 include/save_binlog_position.inc
348 # TRX1: independent
349 INSERT INTO t1 VALUES (1, 1, 1);
350 # Wait for ndb_binlog thread...
351 # now t1 contains one row: (1, 1, 1)
352 include/include/assert_logical_timestamps.inc [0 1]
353 # TRX2: independent
354 BEGIN;
355 INSERT INTO t1 VALUES (2, 2, 2);
356 INSERT INTO t2 VALUES (1);
357 COMMIT;
358 # Wait for ndb_binlog thread...
359 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
360 include/include/assert_logical_timestamps.inc [1 2]
361 # TRX3: independent
362 INSERT INTO t2 VALUES (3);
363 # Wait for ndb_binlog thread...
364 # TRX4: depends on TRX2
365 DELETE FROM t1 WHERE a = 2;
366 # Wait for ndb_binlog thread...
367 # now t1 contains one row: (1, 1, 1)
368 include/include/assert_logical_timestamps.inc [1 3;3 4]
369 # TRX5: independent
370 INSERT INTO t2 VALUES (5);
371 # Wait for ndb_binlog thread...
372 # TRX6: conflict with TRX4 if unique, else with TRX1
373 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
374 # Wait for ndb_binlog thread...
375 # now t1 contains one row: (1, 2, 2)
376 include/include/assert_logical_timestamps.inc [1 5;5 6]
377 DROP TABLE t1;
378 DROP TABLE t2;
379
380 #### 0.1.0.1: WITHOUT PK, NOT NULL, NOT UNIQUE, 1-COLUMN INDEX ####
381
382 CREATE TABLE t1 (
383 a INT,
384 b INT NOT NULL,
385 c INT NOT NULL , INDEX(b)
386 ) engine = NDB;
387 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
388 FLUSH LOGS;
389 include/save_binlog_position.inc
390 # TRX1: independent
391 INSERT INTO t1 VALUES (1, 1, 1);
392 # Wait for ndb_binlog thread...
393 # now t1 contains one row: (1, 1, 1)
394 include/include/assert_logical_timestamps.inc [0 1]
395 # TRX2: independent
396 BEGIN;
397 INSERT INTO t1 VALUES (2, 2, 2);
398 INSERT INTO t2 VALUES (1);
399 COMMIT;
400 # Wait for ndb_binlog thread...
401 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
402 include/include/assert_logical_timestamps.inc [1 2]
403 # TRX3: independent
404 INSERT INTO t2 VALUES (3);
405 # Wait for ndb_binlog thread...
406 # TRX4: depends on TRX2
407 DELETE FROM t1 WHERE a = 2;
408 # Wait for ndb_binlog thread...
409 # now t1 contains one row: (1, 1, 1)
410 include/include/assert_logical_timestamps.inc [1 3;3 4]
411 # TRX5: independent
412 INSERT INTO t2 VALUES (5);
413 # Wait for ndb_binlog thread...
414 # TRX6: conflict with TRX4 if unique, else with TRX1
415 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
416 # Wait for ndb_binlog thread...
417 # now t1 contains one row: (1, 2, 2)
418 include/include/assert_logical_timestamps.inc [1 5;5 6]
419 DROP TABLE t1;
420 DROP TABLE t2;
421
422 #### 0.1.0.2: WITHOUT PK, NOT NULL, NOT UNIQUE, 2-COLUMN INDEX ####
423
424 CREATE TABLE t1 (
425 a INT,
426 b INT NOT NULL,
427 c INT NOT NULL , INDEX(b, c)
428 ) engine = NDB;
429 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
430 FLUSH LOGS;
431 include/save_binlog_position.inc
432 # TRX1: independent
433 INSERT INTO t1 VALUES (1, 1, 1);
434 # Wait for ndb_binlog thread...
435 # now t1 contains one row: (1, 1, 1)
436 include/include/assert_logical_timestamps.inc [0 1]
437 # TRX2: independent
438 BEGIN;
439 INSERT INTO t1 VALUES (2, 2, 2);
440 INSERT INTO t2 VALUES (1);
441 COMMIT;
442 # Wait for ndb_binlog thread...
443 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
444 include/include/assert_logical_timestamps.inc [1 2]
445 # TRX3: independent
446 INSERT INTO t2 VALUES (3);
447 # Wait for ndb_binlog thread...
448 # TRX4: depends on TRX2
449 DELETE FROM t1 WHERE a = 2;
450 # Wait for ndb_binlog thread...
451 # now t1 contains one row: (1, 1, 1)
452 include/include/assert_logical_timestamps.inc [1 3;3 4]
453 # TRX5: independent
454 INSERT INTO t2 VALUES (5);
455 # Wait for ndb_binlog thread...
456 # TRX6: conflict with TRX4 if unique, else with TRX1
457 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
458 # Wait for ndb_binlog thread...
459 # now t1 contains one row: (1, 2, 2)
460 include/include/assert_logical_timestamps.inc [1 5;5 6]
461 DROP TABLE t1;
462 DROP TABLE t2;
463
464 #### 0.1.1.1: WITHOUT PK, NOT NULL, UNIQUE, 1-COLUMN INDEX ####
465
466 CREATE TABLE t1 (
467 a INT,
468 b INT NOT NULL,
469 c INT NOT NULL , UNIQUE INDEX(b)
470 ) engine = NDB;
471 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
472 FLUSH LOGS;
473 include/save_binlog_position.inc
474 # TRX1: independent
475 INSERT INTO t1 VALUES (1, 1, 1);
476 # Wait for ndb_binlog thread...
477 # now t1 contains one row: (1, 1, 1)
478 include/include/assert_logical_timestamps.inc [0 1]
479 # TRX2: independent
480 BEGIN;
481 INSERT INTO t1 VALUES (2, 2, 2);
482 INSERT INTO t2 VALUES (1);
483 COMMIT;
484 # Wait for ndb_binlog thread...
485 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
486 include/include/assert_logical_timestamps.inc [1 2]
487 # TRX3: independent
488 INSERT INTO t2 VALUES (3);
489 # Wait for ndb_binlog thread...
490 # TRX4: depends on TRX2
491 DELETE FROM t1 WHERE a = 2;
492 # Wait for ndb_binlog thread...
493 # now t1 contains one row: (1, 1, 1)
494 include/include/assert_logical_timestamps.inc [1 3;2 4]
495 # TRX5: independent
496 INSERT INTO t2 VALUES (5);
497 # Wait for ndb_binlog thread...
498 # TRX6: conflict with TRX4 if unique, else with TRX1
499 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
500 # Wait for ndb_binlog thread...
501 # now t1 contains one row: (1, 2, 2)
502 include/include/assert_logical_timestamps.inc [1 5;4 6]
503 DROP TABLE t1;
504 DROP TABLE t2;
505
506 #### 0.1.1.2: WITHOUT PK, NOT NULL, UNIQUE, 2-COLUMN INDEX ####
507
508 CREATE TABLE t1 (
509 a INT,
510 b INT NOT NULL,
511 c INT NOT NULL , UNIQUE INDEX(b, c)
512 ) engine = NDB;
513 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
514 FLUSH LOGS;
515 include/save_binlog_position.inc
516 # TRX1: independent
517 INSERT INTO t1 VALUES (1, 1, 1);
518 # Wait for ndb_binlog thread...
519 # now t1 contains one row: (1, 1, 1)
520 include/include/assert_logical_timestamps.inc [0 1]
521 # TRX2: independent
522 BEGIN;
523 INSERT INTO t1 VALUES (2, 2, 2);
524 INSERT INTO t2 VALUES (1);
525 COMMIT;
526 # Wait for ndb_binlog thread...
527 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
528 include/include/assert_logical_timestamps.inc [1 2]
529 # TRX3: independent
530 INSERT INTO t2 VALUES (3);
531 # Wait for ndb_binlog thread...
532 # TRX4: depends on TRX2
533 DELETE FROM t1 WHERE a = 2;
534 # Wait for ndb_binlog thread...
535 # now t1 contains one row: (1, 1, 1)
536 include/include/assert_logical_timestamps.inc [1 3;2 4]
537 # TRX5: independent
538 INSERT INTO t2 VALUES (5);
539 # Wait for ndb_binlog thread...
540 # TRX6: conflict with TRX4 if unique, else with TRX1
541 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
542 # Wait for ndb_binlog thread...
543 # now t1 contains one row: (1, 2, 2)
544 include/include/assert_logical_timestamps.inc [1 5;4 6]
545 DROP TABLE t1;
546 DROP TABLE t2;
547
548 #### 1.0.0.0: WITH PK, NULLABLE, NOT UNIQUE, NO INDEX ####
549
550 CREATE TABLE t1 (
551 a INT PRIMARY KEY,
552 b INT ,
553 c INT
554 ) engine = NDB;
555 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
556 FLUSH LOGS;
557 include/save_binlog_position.inc
558 # TRX1: independent
559 INSERT INTO t1 VALUES (1, 1, 1);
560 # Wait for ndb_binlog thread...
561 # now t1 contains one row: (1, 1, 1)
562 include/include/assert_logical_timestamps.inc [0 1]
563 # TRX2: independent
564 BEGIN;
565 INSERT INTO t1 VALUES (2, 2, 2);
566 INSERT INTO t2 VALUES (1);
567 COMMIT;
568 # Wait for ndb_binlog thread...
569 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
570 include/include/assert_logical_timestamps.inc [1 2]
571 # TRX3: independent
572 INSERT INTO t2 VALUES (3);
573 # Wait for ndb_binlog thread...
574 # TRX4: depends on TRX2
575 DELETE FROM t1 WHERE a = 2;
576 # Wait for ndb_binlog thread...
577 # now t1 contains one row: (1, 1, 1)
578 include/include/assert_logical_timestamps.inc [1 3;2 4]
579 # TRX5: independent
580 INSERT INTO t2 VALUES (5);
581 # Wait for ndb_binlog thread...
582 # TRX6: conflict with TRX4 if unique, else with TRX1
583 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
584 # Wait for ndb_binlog thread...
585 # now t1 contains one row: (1, 2, 2)
586 include/include/assert_logical_timestamps.inc [1 5;1 6]
587 # TRX7: independent
588 INSERT INTO t1 VALUES (3, NULL, 2);
589 # Wait for ndb_binlog thread...
590 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
591 include/include/assert_logical_timestamps.inc [1 7]
592 # TRX8: independent
593 INSERT INTO t2 VALUES (8);
594 # Wait for ndb_binlog thread...
595 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
596 INSERT INTO t1 VALUES (4, NULL, 2);
597 # Wait for ndb_binlog thread...
598 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
599 include/include/assert_logical_timestamps.inc [1 8;1 9]
600 # TRX10: independent
601 INSERT INTO t2 VALUES (10);
602 # Wait for ndb_binlog thread...
603 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
604 DELETE FROM t1 WHERE a = 3;
605 # Wait for ndb_binlog thread...
606 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
607 include/include/assert_logical_timestamps.inc [1 10;7 11]
608 DROP TABLE t1;
609 DROP TABLE t2;
610
611 #### 1.0.0.1: WITH PK, NULLABLE, NOT UNIQUE, 1-COLUMN INDEX ####
612
613 CREATE TABLE t1 (
614 a INT PRIMARY KEY,
615 b INT ,
616 c INT , INDEX(b)
617 ) engine = NDB;
618 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
619 FLUSH LOGS;
620 include/save_binlog_position.inc
621 # TRX1: independent
622 INSERT INTO t1 VALUES (1, 1, 1);
623 # Wait for ndb_binlog thread...
624 # now t1 contains one row: (1, 1, 1)
625 include/include/assert_logical_timestamps.inc [0 1]
626 # TRX2: independent
627 BEGIN;
628 INSERT INTO t1 VALUES (2, 2, 2);
629 INSERT INTO t2 VALUES (1);
630 COMMIT;
631 # Wait for ndb_binlog thread...
632 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
633 include/include/assert_logical_timestamps.inc [1 2]
634 # TRX3: independent
635 INSERT INTO t2 VALUES (3);
636 # Wait for ndb_binlog thread...
637 # TRX4: depends on TRX2
638 DELETE FROM t1 WHERE a = 2;
639 # Wait for ndb_binlog thread...
640 # now t1 contains one row: (1, 1, 1)
641 include/include/assert_logical_timestamps.inc [1 3;2 4]
642 # TRX5: independent
643 INSERT INTO t2 VALUES (5);
644 # Wait for ndb_binlog thread...
645 # TRX6: conflict with TRX4 if unique, else with TRX1
646 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
647 # Wait for ndb_binlog thread...
648 # now t1 contains one row: (1, 2, 2)
649 include/include/assert_logical_timestamps.inc [1 5;1 6]
650 # TRX7: independent
651 INSERT INTO t1 VALUES (3, NULL, 2);
652 # Wait for ndb_binlog thread...
653 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
654 include/include/assert_logical_timestamps.inc [1 7]
655 # TRX8: independent
656 INSERT INTO t2 VALUES (8);
657 # Wait for ndb_binlog thread...
658 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
659 INSERT INTO t1 VALUES (4, NULL, 2);
660 # Wait for ndb_binlog thread...
661 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
662 include/include/assert_logical_timestamps.inc [1 8;1 9]
663 # TRX10: independent
664 INSERT INTO t2 VALUES (10);
665 # Wait for ndb_binlog thread...
666 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
667 DELETE FROM t1 WHERE a = 3;
668 # Wait for ndb_binlog thread...
669 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
670 include/include/assert_logical_timestamps.inc [1 10;7 11]
671 DROP TABLE t1;
672 DROP TABLE t2;
673
674 #### 1.0.0.2: WITH PK, NULLABLE, NOT UNIQUE, 2-COLUMN INDEX ####
675
676 CREATE TABLE t1 (
677 a INT PRIMARY KEY,
678 b INT ,
679 c INT , INDEX(b, c)
680 ) engine = NDB;
681 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
682 FLUSH LOGS;
683 include/save_binlog_position.inc
684 # TRX1: independent
685 INSERT INTO t1 VALUES (1, 1, 1);
686 # Wait for ndb_binlog thread...
687 # now t1 contains one row: (1, 1, 1)
688 include/include/assert_logical_timestamps.inc [0 1]
689 # TRX2: independent
690 BEGIN;
691 INSERT INTO t1 VALUES (2, 2, 2);
692 INSERT INTO t2 VALUES (1);
693 COMMIT;
694 # Wait for ndb_binlog thread...
695 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
696 include/include/assert_logical_timestamps.inc [1 2]
697 # TRX3: independent
698 INSERT INTO t2 VALUES (3);
699 # Wait for ndb_binlog thread...
700 # TRX4: depends on TRX2
701 DELETE FROM t1 WHERE a = 2;
702 # Wait for ndb_binlog thread...
703 # now t1 contains one row: (1, 1, 1)
704 include/include/assert_logical_timestamps.inc [1 3;2 4]
705 # TRX5: independent
706 INSERT INTO t2 VALUES (5);
707 # Wait for ndb_binlog thread...
708 # TRX6: conflict with TRX4 if unique, else with TRX1
709 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
710 # Wait for ndb_binlog thread...
711 # now t1 contains one row: (1, 2, 2)
712 include/include/assert_logical_timestamps.inc [1 5;1 6]
713 # TRX7: independent
714 INSERT INTO t1 VALUES (3, NULL, 2);
715 # Wait for ndb_binlog thread...
716 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
717 include/include/assert_logical_timestamps.inc [1 7]
718 # TRX8: independent
719 INSERT INTO t2 VALUES (8);
720 # Wait for ndb_binlog thread...
721 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
722 INSERT INTO t1 VALUES (4, NULL, 2);
723 # Wait for ndb_binlog thread...
724 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
725 include/include/assert_logical_timestamps.inc [1 8;1 9]
726 # TRX10: independent
727 INSERT INTO t2 VALUES (10);
728 # Wait for ndb_binlog thread...
729 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
730 DELETE FROM t1 WHERE a = 3;
731 # Wait for ndb_binlog thread...
732 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
733 include/include/assert_logical_timestamps.inc [1 10;7 11]
734 DROP TABLE t1;
735 DROP TABLE t2;
736
737 #### 1.0.1.1: WITH PK, NULLABLE, UNIQUE, 1-COLUMN INDEX ####
738
739 CREATE TABLE t1 (
740 a INT PRIMARY KEY,
741 b INT ,
742 c INT , UNIQUE INDEX(b)
743 ) engine = NDB;
744 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
745 FLUSH LOGS;
746 include/save_binlog_position.inc
747 # TRX1: independent
748 INSERT INTO t1 VALUES (1, 1, 1);
749 # Wait for ndb_binlog thread...
750 # now t1 contains one row: (1, 1, 1)
751 include/include/assert_logical_timestamps.inc [0 1]
752 # TRX2: independent
753 BEGIN;
754 INSERT INTO t1 VALUES (2, 2, 2);
755 INSERT INTO t2 VALUES (1);
756 COMMIT;
757 # Wait for ndb_binlog thread...
758 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
759 include/include/assert_logical_timestamps.inc [1 2]
760 # TRX3: independent
761 INSERT INTO t2 VALUES (3);
762 # Wait for ndb_binlog thread...
763 # TRX4: depends on TRX2
764 DELETE FROM t1 WHERE a = 2;
765 # Wait for ndb_binlog thread...
766 # now t1 contains one row: (1, 1, 1)
767 include/include/assert_logical_timestamps.inc [1 3;2 4]
768 # TRX5: independent
769 INSERT INTO t2 VALUES (5);
770 # Wait for ndb_binlog thread...
771 # TRX6: conflict with TRX4 if unique, else with TRX1
772 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
773 # Wait for ndb_binlog thread...
774 # now t1 contains one row: (1, 2, 2)
775 include/include/assert_logical_timestamps.inc [1 5;4 6]
776 # TRX7: independent
777 INSERT INTO t1 VALUES (3, NULL, 2);
778 # Wait for ndb_binlog thread...
779 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
780 include/include/assert_logical_timestamps.inc [1 7]
781 # TRX8: independent
782 INSERT INTO t2 VALUES (8);
783 # Wait for ndb_binlog thread...
784 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
785 INSERT INTO t1 VALUES (4, NULL, 2);
786 # Wait for ndb_binlog thread...
787 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
788 include/include/assert_logical_timestamps.inc [1 8;1 9]
789 # TRX10: independent
790 INSERT INTO t2 VALUES (10);
791 # Wait for ndb_binlog thread...
792 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
793 DELETE FROM t1 WHERE a = 3;
794 # Wait for ndb_binlog thread...
795 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
796 include/include/assert_logical_timestamps.inc [1 10;7 11]
797 DROP TABLE t1;
798 DROP TABLE t2;
799
800 #### 1.0.1.2: WITH PK, NULLABLE, UNIQUE, 2-COLUMN INDEX ####
801
802 CREATE TABLE t1 (
803 a INT PRIMARY KEY,
804 b INT ,
805 c INT , UNIQUE INDEX(b, c)
806 ) engine = NDB;
807 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
808 FLUSH LOGS;
809 include/save_binlog_position.inc
810 # TRX1: independent
811 INSERT INTO t1 VALUES (1, 1, 1);
812 # Wait for ndb_binlog thread...
813 # now t1 contains one row: (1, 1, 1)
814 include/include/assert_logical_timestamps.inc [0 1]
815 # TRX2: independent
816 BEGIN;
817 INSERT INTO t1 VALUES (2, 2, 2);
818 INSERT INTO t2 VALUES (1);
819 COMMIT;
820 # Wait for ndb_binlog thread...
821 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
822 include/include/assert_logical_timestamps.inc [1 2]
823 # TRX3: independent
824 INSERT INTO t2 VALUES (3);
825 # Wait for ndb_binlog thread...
826 # TRX4: depends on TRX2
827 DELETE FROM t1 WHERE a = 2;
828 # Wait for ndb_binlog thread...
829 # now t1 contains one row: (1, 1, 1)
830 include/include/assert_logical_timestamps.inc [1 3;2 4]
831 # TRX5: independent
832 INSERT INTO t2 VALUES (5);
833 # Wait for ndb_binlog thread...
834 # TRX6: conflict with TRX4 if unique, else with TRX1
835 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
836 # Wait for ndb_binlog thread...
837 # now t1 contains one row: (1, 2, 2)
838 include/include/assert_logical_timestamps.inc [1 5;4 6]
839 # TRX7: independent
840 INSERT INTO t1 VALUES (3, NULL, 2);
841 # Wait for ndb_binlog thread...
842 # now t1 contains two rows: (1, 2, 2), (3, NULL, 2)
843 include/include/assert_logical_timestamps.inc [1 7]
844 # TRX8: independent
845 INSERT INTO t2 VALUES (8);
846 # Wait for ndb_binlog thread...
847 # TRX9: independent (no conflict with TRX7 since multiple NULLs are allowed)
848 INSERT INTO t1 VALUES (4, NULL, 2);
849 # Wait for ndb_binlog thread...
850 # now t1 contains three rows: (1, 2, 2), (3, NULL, 2), (4, NULL, 2)
851 include/include/assert_logical_timestamps.inc [1 8;1 9]
852 # TRX10: independent
853 INSERT INTO t2 VALUES (10);
854 # Wait for ndb_binlog thread...
855 # TRX11: conflict with TRX7 (not with TRX9 since multiple NULLs are allowed)
856 DELETE FROM t1 WHERE a = 3;
857 # Wait for ndb_binlog thread...
858 # now t1 contains two rows: (1, 2, 2), (4, NULL, 2)
859 include/include/assert_logical_timestamps.inc [1 10;7 11]
860 DROP TABLE t1;
861 DROP TABLE t2;
862
863 #### 1.1.0.0: WITH PK, NOT NULL, NOT UNIQUE, NO INDEX ####
864
865 CREATE TABLE t1 (
866 a INT PRIMARY KEY,
867 b INT NOT NULL,
868 c INT NOT NULL
869 ) engine = NDB;
870 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
871 FLUSH LOGS;
872 include/save_binlog_position.inc
873 # TRX1: independent
874 INSERT INTO t1 VALUES (1, 1, 1);
875 # Wait for ndb_binlog thread...
876 # now t1 contains one row: (1, 1, 1)
877 include/include/assert_logical_timestamps.inc [0 1]
878 # TRX2: independent
879 BEGIN;
880 INSERT INTO t1 VALUES (2, 2, 2);
881 INSERT INTO t2 VALUES (1);
882 COMMIT;
883 # Wait for ndb_binlog thread...
884 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
885 include/include/assert_logical_timestamps.inc [1 2]
886 # TRX3: independent
887 INSERT INTO t2 VALUES (3);
888 # Wait for ndb_binlog thread...
889 # TRX4: depends on TRX2
890 DELETE FROM t1 WHERE a = 2;
891 # Wait for ndb_binlog thread...
892 # now t1 contains one row: (1, 1, 1)
893 include/include/assert_logical_timestamps.inc [1 3;2 4]
894 # TRX5: independent
895 INSERT INTO t2 VALUES (5);
896 # Wait for ndb_binlog thread...
897 # TRX6: conflict with TRX4 if unique, else with TRX1
898 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
899 # Wait for ndb_binlog thread...
900 # now t1 contains one row: (1, 2, 2)
901 include/include/assert_logical_timestamps.inc [1 5;1 6]
902 DROP TABLE t1;
903 DROP TABLE t2;
904
905 #### 1.1.0.1: WITH PK, NOT NULL, NOT UNIQUE, 1-COLUMN INDEX ####
906
907 CREATE TABLE t1 (
908 a INT PRIMARY KEY,
909 b INT NOT NULL,
910 c INT NOT NULL , INDEX(b)
911 ) engine = NDB;
912 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
913 FLUSH LOGS;
914 include/save_binlog_position.inc
915 # TRX1: independent
916 INSERT INTO t1 VALUES (1, 1, 1);
917 # Wait for ndb_binlog thread...
918 # now t1 contains one row: (1, 1, 1)
919 include/include/assert_logical_timestamps.inc [0 1]
920 # TRX2: independent
921 BEGIN;
922 INSERT INTO t1 VALUES (2, 2, 2);
923 INSERT INTO t2 VALUES (1);
924 COMMIT;
925 # Wait for ndb_binlog thread...
926 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
927 include/include/assert_logical_timestamps.inc [1 2]
928 # TRX3: independent
929 INSERT INTO t2 VALUES (3);
930 # Wait for ndb_binlog thread...
931 # TRX4: depends on TRX2
932 DELETE FROM t1 WHERE a = 2;
933 # Wait for ndb_binlog thread...
934 # now t1 contains one row: (1, 1, 1)
935 include/include/assert_logical_timestamps.inc [1 3;2 4]
936 # TRX5: independent
937 INSERT INTO t2 VALUES (5);
938 # Wait for ndb_binlog thread...
939 # TRX6: conflict with TRX4 if unique, else with TRX1
940 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
941 # Wait for ndb_binlog thread...
942 # now t1 contains one row: (1, 2, 2)
943 include/include/assert_logical_timestamps.inc [1 5;1 6]
944 DROP TABLE t1;
945 DROP TABLE t2;
946
947 #### 1.1.0.2: WITH PK, NOT NULL, NOT UNIQUE, 2-COLUMN INDEX ####
948
949 CREATE TABLE t1 (
950 a INT PRIMARY KEY,
951 b INT NOT NULL,
952 c INT NOT NULL , INDEX(b, c)
953 ) engine = NDB;
954 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
955 FLUSH LOGS;
956 include/save_binlog_position.inc
957 # TRX1: independent
958 INSERT INTO t1 VALUES (1, 1, 1);
959 # Wait for ndb_binlog thread...
960 # now t1 contains one row: (1, 1, 1)
961 include/include/assert_logical_timestamps.inc [0 1]
962 # TRX2: independent
963 BEGIN;
964 INSERT INTO t1 VALUES (2, 2, 2);
965 INSERT INTO t2 VALUES (1);
966 COMMIT;
967 # Wait for ndb_binlog thread...
968 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
969 include/include/assert_logical_timestamps.inc [1 2]
970 # TRX3: independent
971 INSERT INTO t2 VALUES (3);
972 # Wait for ndb_binlog thread...
973 # TRX4: depends on TRX2
974 DELETE FROM t1 WHERE a = 2;
975 # Wait for ndb_binlog thread...
976 # now t1 contains one row: (1, 1, 1)
977 include/include/assert_logical_timestamps.inc [1 3;2 4]
978 # TRX5: independent
979 INSERT INTO t2 VALUES (5);
980 # Wait for ndb_binlog thread...
981 # TRX6: conflict with TRX4 if unique, else with TRX1
982 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
983 # Wait for ndb_binlog thread...
984 # now t1 contains one row: (1, 2, 2)
985 include/include/assert_logical_timestamps.inc [1 5;1 6]
986 DROP TABLE t1;
987 DROP TABLE t2;
988
989 #### 1.1.1.1: WITH PK, NOT NULL, UNIQUE, 1-COLUMN INDEX ####
990
991 CREATE TABLE t1 (
992 a INT PRIMARY KEY,
993 b INT NOT NULL,
994 c INT NOT NULL , UNIQUE INDEX(b)
995 ) engine = NDB;
996 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
997 FLUSH LOGS;
998 include/save_binlog_position.inc
999 # TRX1: independent
1000 INSERT INTO t1 VALUES (1, 1, 1);
1001 # Wait for ndb_binlog thread...
1002 # now t1 contains one row: (1, 1, 1)
1003 include/include/assert_logical_timestamps.inc [0 1]
1004 # TRX2: independent
1005 BEGIN;
1006 INSERT INTO t1 VALUES (2, 2, 2);
1007 INSERT INTO t2 VALUES (1);
1008 COMMIT;
1009 # Wait for ndb_binlog thread...
1010 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
1011 include/include/assert_logical_timestamps.inc [1 2]
1012 # TRX3: independent
1013 INSERT INTO t2 VALUES (3);
1014 # Wait for ndb_binlog thread...
1015 # TRX4: depends on TRX2
1016 DELETE FROM t1 WHERE a = 2;
1017 # Wait for ndb_binlog thread...
1018 # now t1 contains one row: (1, 1, 1)
1019 include/include/assert_logical_timestamps.inc [1 3;2 4]
1020 # TRX5: independent
1021 INSERT INTO t2 VALUES (5);
1022 # Wait for ndb_binlog thread...
1023 # TRX6: conflict with TRX4 if unique, else with TRX1
1024 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
1025 # Wait for ndb_binlog thread...
1026 # now t1 contains one row: (1, 2, 2)
1027 include/include/assert_logical_timestamps.inc [1 5;4 6]
1028 DROP TABLE t1;
1029 DROP TABLE t2;
1030
1031 #### 1.1.1.2: WITH PK, NOT NULL, UNIQUE, 2-COLUMN INDEX ####
1032
1033 CREATE TABLE t1 (
1034 a INT PRIMARY KEY,
1035 b INT NOT NULL,
1036 c INT NOT NULL , UNIQUE INDEX(b, c)
1037 ) engine = NDB;
1038 CREATE TABLE t2 (a INT PRIMARY KEY) engine = NDB;
1039 FLUSH LOGS;
1040 include/save_binlog_position.inc
1041 # TRX1: independent
1042 INSERT INTO t1 VALUES (1, 1, 1);
1043 # Wait for ndb_binlog thread...
1044 # now t1 contains one row: (1, 1, 1)
1045 include/include/assert_logical_timestamps.inc [0 1]
1046 # TRX2: independent
1047 BEGIN;
1048 INSERT INTO t1 VALUES (2, 2, 2);
1049 INSERT INTO t2 VALUES (1);
1050 COMMIT;
1051 # Wait for ndb_binlog thread...
1052 # now t1 contains two rows: (1, 1, 1), (2, 2, 2)
1053 include/include/assert_logical_timestamps.inc [1 2]
1054 # TRX3: independent
1055 INSERT INTO t2 VALUES (3);
1056 # Wait for ndb_binlog thread...
1057 # TRX4: depends on TRX2
1058 DELETE FROM t1 WHERE a = 2;
1059 # Wait for ndb_binlog thread...
1060 # now t1 contains one row: (1, 1, 1)
1061 include/include/assert_logical_timestamps.inc [1 3;2 4]
1062 # TRX5: independent
1063 INSERT INTO t2 VALUES (5);
1064 # Wait for ndb_binlog thread...
1065 # TRX6: conflict with TRX4 if unique, else with TRX1
1066 UPDATE t1 SET b = 2, c = 2 WHERE a = 1;
1067 # Wait for ndb_binlog thread...
1068 # now t1 contains one row: (1, 2, 2)
1069 include/include/assert_logical_timestamps.inc [1 5;4 6]
1070 DROP TABLE t1;
1071 DROP TABLE t2;
1072 #### CLEAN UP ####
1073 SET @@GLOBAL.binlog_transaction_dependency_tracking= COMMIT_ORDER;
1074 Warnings:
1075 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
1076 SET @@GLOBAL.binlog_transaction_dependency_tracking= @save_binlog_transaction_dependency_tracking;
1077 Warnings:
1078 Warning 1287 '@@binlog_transaction_dependency_tracking' is deprecated and will be removed in a future release.
1079 include/sync_slave_sql_with_master.inc
1080 SET @@GLOBAL.replica_parallel_workers= @save_replica_parallel_workers;
1081 include/rpl_end.inc