forked from mysql/mysql-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrpl_mixing_engines.test
1817 lines (1404 loc) · 54.4 KB
/
rpl_mixing_engines.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
################################################################################
# - Introduction
# This checks if transactions that mixes transactional and non-transactional
# are correctly handled. There are several types of statements that require
# attention because of their special behavior in transactions:
#
# * Non-transactional updates that take place inside a transaction present
# problems for logging because (1) they are visible to other clients before
# the transaction is committed, and (2) they are not rolled back even if the
# transaction is rolled back. It is not always possible to log correctly in
# statement format when both transactional and non-transactional tables are
# used in the same transaction.
#
# * Statements that do an implicit commit (i.e., most but not all DDL, and
# some utility commands) are logged specially due to unspecified requirements by
# NDB.
#
# * Statements that update temporary tables need special treatment since they
# are not logged in row format.
#
# - Definitions
#
# To reason about logging different table types, we make some preliminary
# definitions.
#
# * A table that has a transactional engine is called a T-table.
#
# * A table that has a non-transactional engine is called an N-table.
#
# * A statement makes an N-write if it makes any type of change to the server
# state that will not be changed by a ROLLBACK.
#
# * Events are either appended to the Transaction Cache (TC) or to the
# Statement Cache (SC) or written directly to the binlog.
#
# - Preliminary Rules
#
# The following preliminary rules are actually consequences of the principle
# that statements shall be correctly logged when binlog_format=MIXED or ROW.
# They also apply when binlog_format=STATEMENT: this makes statement format
# work in many practical cases.
#
# * (Causality) If statement A is executed before statement B, and B is logged
# in statement format, and B reads tables that A may modifies, then B shall be
# logged after A.
#
# * (Durability) Events shall be written to the binary log at the moment they
# take effect. In particular, changes to N-tables shall be written to the
# binary log when they have been executed, and changes to T-tables shall be
# written to the binary log on commit. If --sync-binlog has been specified,
# then it suffices that events are be written to the binary log at the next
# synchronization point.
#
# * (causality-precedence) If causality and durability cannot both be
# fulfilled, then casuality is considered more important.
#
# - Rules for non-committing statements, except CREATE TEMPORARY TABLE...SELECT
#
# The preliminary rules above, together with the principles for logging format
# , have been used to construct the following rules.
#
# CALL statements are unrolled, so that each statement executed by the stored
# procedure is logged separately. (If a stored procedure A invokes a stored
# procedure B, then B is unrolled recursively). In the following, we assume
# that unrolling has already been done, and the word "statement" refers to a
# non-CALL top-level statement or a non-CALL sub-statement.
#
# Let S be a logged statement that does not have an implicit commit, except
# CREATE TEMPORARY TABLE...SELECT (This includes all "pure DML": INSERT,
# UPDATE, DELETE, REPLACE, TRUNCATE, SELECT, DO, CALL, EXECUTE, LOAD DATA
# INFILE, and BINLOG. It also includes CREATE TEMPORARY TABLE without SELECT,
# and DROP TEMPORARY TABLE. CREATE TEMPORARY TABLE...SELECT is handled in the
# next subsection).
#
# Before executing S, determine unsafeness:
#
# * If S either makes N-writes or reads from an N-table, and either S or a
# previous statement in the same transaction reads or writes to a T-table,
# then S is marked as unsafe.
#
# When logging S, determine where to log it by applying the following rules in
# order:
#
# * If S is to be logged in statement format (i.e., if one of the following
# holds: (1) STATEMENT; (2) MIXED and S is safe; (3) S is of DDL type, i.e.,
# CREATE TEMPORARY TABLE):
# 1. If S produces an error and does not do any N-write, do not log.
# 2. Otherwise, if either S or any previous statement in the same
# transaction reads or writes in any T-tables, log to TC.
# 3. Otherwise, log to SC.
#
# * If S is to be logged in row format (i.e., if S is DML and one of the
# following holds: (1) ROW; (2) MIXED and S is unsafe):
# 1. Do not log row events that write to temporary tables.
# 2. Log row events that write to non-temporary N-tables to SC.
# 3. Log row events that write to non-temporary T-tables to TC, except
# rows that are rolled back due to an error. (Note: if there is an error,
# rows written to a T-table are kept if there are subsequent rows written
# to an N-table.)
#
# * At the end of S, write BEGIN + SC + COMMIT to the binlog and clear the
# SC.
#
# At end of transaction:
#
# * At COMMIT or implicit commit, where all XA tables in the transaction
# succeed in the "prepare" phase:
# 1. If the TC is non-empty, write BEGIN + TC + COMMIT to the binlog.
# 2. If the TC is empty, do nothing.
#
# * At ROLLBACK; or at COMMIT or implicit commit where some XA table fails
# in the "prepare" phase:
# 1. If the TC contains any N-write, write BEGIN + TC + ROLLBACK to the
# binlog.
# 2. If the TC does not contain any N-write, do nothing.
#
# * At ROLLBACK TO SAVEPOINT:
# 1. If the TC contains any N-write after the savepoint, write ROLLBACK TO
# SAVEPOINT to the TC.
# 2. Otherwise, clear the part of the TC that starts at the savepoint and
# extends to the end of the TC. (Bug#47327 breaks this rule)
#
# * Clear the TC at the end of the transaction.
#
# - Rules for CREATE [TEMPORARY] TABLE...SELECT
#
# First, unsafeness is determined as above (R-unsafe-transaction). Then the
# logging format is decided. Then the following rules apply.
#
# * If logging in statement format (i.e., one of the following holds: (1)
# STATEMENT; (2) MIXED and statement is safe):
# 1. If there is an error, do not write anything.
# 2. If there is no error and the TEMPORARY keyword is used, write the
# entire CREATE...SELECT statement to the TC.
# 3. If there is no error and the TEMPORARY keyword is not used, write the
# entire CREATE...SELECT directly to the binlog.
#
# * If logging in row format (i.e., one of the following holds: (1) ROW; (2)
# MIXED and statement is unsafe):
# 1. If the TEMPORARY keyword is used, do not write anything.
# 2. If the TEMPORARY keyword is not used, write CREATE TABLE (without
# select) + BEGIN + row events + COMMIT to the TC. If there is an error,
# clear the TC; otherwise flush the TC to the binlog at the end of the
# statement and then clear the TC. (Note: currently Bug#47899 breaks this
# rule)
#
# - Rules for committing statements, except CREATE [TEMPORARY] TABLE...SELECT
#
# * All other statements that have a pre-commit are written directly to the
# binlog. (Note: this is semantically equivalent to writing it to the SC and
# flushing the SC. However, due to requirements by NDB (which have not been
# clarified), we write directly to the binlog.)
#
# We use the include file rpl_mixing_engines.inc to generate sql commands from a
# format string. The format string consists of a sequence of 'codes' separated
# by spaces. The following codes exist:
#
# - Define the scope of a transaction:
# B - Begin.
# C - Commit.
# R - Rollback.
# Sn - Savepoint Sn.
# Rn - Rollback to Sn.
#
# - Change only T-Tables:
# T - Updates a T-Table.
# T-trig - Updates T-Tables through a trigger.
# T-func - Updates T-Tables through a function.
# T-proc - Updates T-Tables through a procedure.
# eT - Fails while updating the first tuple in a T-Table.
# Te - Fails while updating an n-tuple (n > 1) in a T-Table.
# Te-trig - Fails while updating an n-tuple (n > 1) in a T-Table.
# Te-func - Fails while updating an n-tuple (n > 1) in a T-Table.
#
# - Change only N-Tables
# N - Updates a N-Table.
# N-trig - Updates N-Tables through a trigger.
# N-func - Updates N-Tables through a function.
# N-proc - Updates N-Tables through a procedure.
# eN - Fails while updating the first tuple in a N-Table.
# Ne - Fails while updating an n-tuple (n > 1) in a N-Table.
# Ne-trig - Fails while updating an n-tuple (n > 1) in a N-Table.
# Ne-func - Fails while updating an n-tuple (n > 1) in a N-Table.
#
# - Read T-table and write N-table:
# tN - Updates a N-Table
# tNe - Fails while updating an n-tuple (n > 1) in a N-Table.
#
# - Read N-table and write T-table:
# nT - Updates a T-Table.
# nTe - Fails while updating an n-tuple (n > 1) in a T-Table.
#
# - Update both types of tables. First a N-Table and the a T-Table:
# NT - Upates both types of tables through an update statement.
# NT-trig - Updates both types of tables through a trigger.
# NT-func - Updates both types of tables through a procedure.
# NeT-trig - Fails while updating an n-tuple (n > 1) in a T-Table.
# NeT-func - Fails while updating an n-tuple (n > 1) in a T-Table.
#
# - Update both types of tables. First a T-Table and the a N-Table:
# TN - Upates both types of tables through an update statement.
# TN-trig - Updates both types of tables through a trigger.
# TN-func - Updates both types of tables through a procedure.
# TeN-trig - Fails while updating an n-tuple (n > 1) in a N-Table.
# TeN-func - Fails while updating an n-tuple (n > 1) in a N-Table.
#
# - This is CREATE...SELECT:
# CS-T->T - Creates a T-table selecting from a T-table.
# CS-N->N - Creates a N-table selecting from a N-table.
# CS-T->N - Creates a T-table selecting form a N-table.
# CS-N->T - Creates a N-table selecting from a T-table.
# CSe-T->T - Fails while creating a T-table selecting from a T-table.
# CSe-N->N - Fails while creating a N-table selecting from a N-table.
# CSe-T->N - Fails while creating a T-table selecting from a a N-table.
# CSe-N->T - Fails while creating a N-table selecting from a T-table.
# drop-CS - Drops any of the tables previously created.
# trunc-CS-T - Truncates a T-table previously created.
# trunc-CS-N - Truncates a N-table previously created.
# CT - Creates a temporary T-table.
# drop-CT - Drops a temporary T-table.
#
# - This is INSERT...SELECT:
# IS-T<-T - Inserts data from a T-table into a T-table.
# IS-T<-N - Inserts data from a N-table into a T-table.
# IS-N<-T - Inserts data from a T-table into a N-table.
# IS-N<-N - Inserts data from a N-table into a N-table.
# ISe-T<-T - Fails while inserting data from a T-table into a T-table.
# ISe-T<-N - Fails while inserting data from a N-table into a T-table.
# ISe-N<-T - Fails while inserting data from a T-table into a N-table.
# ISe-N<-N - Fails while inserting data from a N-table into a N-table.
#
# For the CREATE...SELECT and INSERT...SELECT, the table names are defined based
# on the variable $tb_id which is automatically incremented after each drop.
# This indirectly means that two tables cannot co-exist unless we manually keep
# the variable $tb_id.
#
# The format of the entries in the binlog depends on the mode and on the type
# statements: S - statement and R - row. And when it is clear from the context
# which statement is referred to, we sometimes use "M" to denote a "Mixed"
# statement, i.e., one that accesses both a T-table and an N-table.
#
# For further details, please, read WL#2687 and WL#5072.
################################################################################
--echo #########################################################################
--echo # CONFIGURATION
--echo #########################################################################
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
--let $verbose= 1
--let $commands= configure
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo #########################################################################
--echo # 1 - MIXING TRANSACTIONAL and NON-TRANSACTIONAL TABLES
--echo #########################################################################
connection master;
--echo
--echo
--echo
--echo
--echo #
--echo #1) Generates in the binlog what follows:
--echo # --> STMT "B T C" entries, format S.
--echo # --> ROW "B T C" entries, format R.
--echo # --> MIXED "B T C" entries, format S.
--echo #
--let $commands= T
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= T-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= T-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= T-proc
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #1.e) Generates in the binlog what follows:
--echo # --> STMT empty.
--echo # --> ROW empty.
--echo # --> MIXED empty.
--echo #
--let $commands= eT
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= Te
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= Te-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= Te-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #2) Generates in the binlog what follows:
--echo # --> STMT "B N C" entry, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format S.
--echo #
--let $commands= N
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= N-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= N-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= N-proc
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #2.e) Generates in the binlog what follows if a N-table is changed:
--echo # --> STMT "B N C" entry, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format S.
--echo #
--let $commands= eN
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= Ne
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= Ne-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= Ne-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #3) Generates in the binlog what follows:
--echo # --> STMT "B M C" entry if only N-Table is changed, format S.
--echo # --> STMT "B M C" entries, format S.
--echo # --> ROW "B N T B T C" entries, format R.
--echo # --> MIXED "B N T B T C" entries, format R.
--echo #
--let $commands= tN
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= nT
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= NT
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= NT-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= NT-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= TN
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= TN-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= TN-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #3.e) Generates in the binlog what follows:
--echo # --> STMT "B M C" entry if only N-Table is changed, format S.
--echo # --> STMT "B M R" entries, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format R.
--let $commands= tNe
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= nTe
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= NeT-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= NeT-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= TeN-trig
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= TeN-func
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #4) Generates in the binlog what follows:
--echo # --> STMT "B T T C" entries, format S.
--echo # --> ROW "B T T C" entries, format R.
--echo # --> MIXED "B T T C" entries, format S
--echo #
--let $commands= B T T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T T-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T T-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #4.e) Generates in the binlog what follows:
--echo # --> STMT "B T C" entries, format S.
--echo # --> ROW "B T C" entries, format R.
--echo # --> MIXED "B T C" entries, format S.
--echo #
--let $commands= B T eT C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Te C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Te-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Te-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B eT T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te-trig T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te-func T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #5) Generates in the binlog what follows:
--echo # --> STMT empty.
--echo # --> ROW empty.
--echo # --> MIXED empty.
--echo #
--let $commands= B T T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T T-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T T-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T T-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig T-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func T-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc T-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #5.e) Generates in the binlog what follows:
--echo # --> STMT empty.
--echo # --> ROW empty.
--echo # --> MIXED empty.
--echo #
--let $commands= B T eT R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Te R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Te-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Te-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B eT T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te-trig T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te-func T R
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #6) Generates in the binlog what follows:
--echo # --> STMT "B N C B N C" entries, format S.
--echo # --> ROW "B N C B N C" entries, format R.
--echo # --> MIXED "B N C B N C" entries, format S.
--echo #
--let $commands= B N N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #6.e) Generates in the binlog what follows if a N-Table is changed:
--echo # --> STMT "B N C B N C" entries, format S.
--echo # --> ROW "B N C B N C" entries, format R.
--echo # --> MIXED "B N C B N C" entries, format S.
--echo #
--let $commands= B N eN C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N Ne C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N Ne-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N Ne-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B eN N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Ne N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Ne-trig N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Ne-func N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #7) Generates in the binlog what follows:
--echo # --> STMT "B N C B N C" entries, format S.
--echo # --> ROW "B N C B N C" entries, format R.
--echo # --> MIXED "B N C B N C" entries, format S.
--echo #
--let $commands= B N N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-proc N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #7.e) Generates in the binlog what follows if a N-Table is changed:
--echo # --> STMT "B N C B N C" entries, format S.
--echo # --> ROW "B N C B N C" entries, format R.
--echo # --> MIXED "B N C B N C" entries, format S.
--echo #
--let $commands= B N eN R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N Ne R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N Ne-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N Ne-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B eN N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Ne N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Ne-trig N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Ne-func N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #8) Generates in the binlog what follows:
--echo # --> STMT "B T N C" entries, format S.
--echo # --> ROW "B N C B T C" entries, format R.
--echo # --> MIXED "B N C B T C" entries, format R in N and S in T.
--echo #
--let $commands= B T N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #8.e) Generates in the binlog what follows if T-* fails:
--echo # --> STMT "B N C" entry, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format R.
--echo # Otherwise, what follows if N-* fails and a N-Table is changed:
--echo # --> STMT "B T N C" entries, format S.
--echo # --> ROW "B N C B T C" entries, format R.
--echo # --> MIXED "B N C B T C" entries, format R in N and S in T.
--echo #
--let $commands= B eT N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te N C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T eN C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Ne C
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #9) Generates in the binlog what follows:
--echo # --> STMT "B T N R" entries, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format R.
--echo #
--let $commands= B T N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-trig N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-func N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N-trig R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N-func R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T-proc N-proc R
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #9.e) Generates in the binlog what follows if T* fails:
--echo # --> STMT "B N C" entry, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format R.
--echo # Otherwise, what follows if N* fails and a N-Table is changed:
--echo # --> STMT "B T N R" entries, format S.
--echo # --> ROW "B N C" entry, format R.
--echo # --> MIXED "B N C" entry, format R.
--echo #
--let $commands= B eT N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B Te N R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T eN R
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B T Ne R
--source extra/rpl_tests/rpl_mixing_engines.inc
--echo
--echo
--echo
--echo
--echo #
--echo #10) Generates in the binlog:
--echo # --> STMT "B N C B T C" entries, format S.
--echo # --> ROW "B N C B T C" entries, format R.
--echo # --> MIXED "B N C B T C" entries, format S.
--echo #
--let $commands= B N T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N T-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N T-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig T-func C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-trig T-proc C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func T C
--source extra/rpl_tests/rpl_mixing_engines.inc
--let $commands= B N-func T-trig C
--source extra/rpl_tests/rpl_mixing_engines.inc