Debian Codegraph @

mysql-test/suite/ndb_rpl/t/ndb_rpl_conflict_epoch2_trans.test

raw
1 --echo Testing NDB$EPOCH2_TRANS algorithm
2
3 #let $rpl_debug=1;
4
5 let $clusterA_port=$MASTER_MYPORT;
6 let $clusterB_port=$SLAVE_MYPORT;
7
8 #let $clusterA_port=$SLAVE_MYPORT;
9 #let $clusterB_port=$MASTER_MYPORT;
10 #let $SWITCH_CLUSTER_ROLES=1;
11
12 #echo $clusterA_port;
13 #echo $clusterB_port;
14
15 --echo Setup connections for use in this file
16 --connect(clusterA,127.0.0.1,root,,test,$clusterA_port,)
17 --connect(clusterB,127.0.0.1,root,,test,$clusterB_port,)
18
19 --echo First we have Cluster A as Primary, Cluster B as Secondary
20 --connection clusterA
21 #SHOW VARIABLES LIKE '%server%';
22 SET GLOBAL ndb_applier_conflict_role="PRIMARY";
23
24 --connection clusterB
25 #SHOW VARIABLES LIKE '%server%';
26 SET GLOBAL ndb_applier_conflict_role="SECONDARY";
27
28 --connection clusterA
29
30 let $PRIMARY_CONFLICT_ALG=\"NDB\$EPOCH2_TRANS()\";
31 let $SECONDARY_CONFLICT_ALG=\"NDB\$EPOCH2_TRANS()\";
32
33 --source suite/ndb_rpl/t/ndb_rpl_conflict_epoch_trans.inc
34
35 --echo Next we have Cluster A as Secondary, Cluster B as Primary
36 --connection clusterA
37 SET GLOBAL ndb_applier_conflict_role="NONE";
38 SET GLOBAL ndb_applier_conflict_role="SECONDARY";
39
40 --connection clusterB
41 SET GLOBAL ndb_applier_conflict_role="NONE";
42 SET GLOBAL ndb_applier_conflict_role="PRIMARY";
43
44 --echo We set a special control var to allow the generic scripts
45 --echo to handle this topology
46 let $SWITCH_CLUSTER_ROLES=1;
47
48 --echo Remove some connections which can't be setup twice (ugly)
49 --disconnect master
50 --disconnect master1
51 --disconnect slave
52 --disconnect slave1
53
54 --source suite/ndb_rpl/t/ndb_rpl_conflict_epoch_trans.inc
55
56 # TODO : Switch back to A Primary, B Secondary?
57
58 --connection clusterA
59 SET GLOBAL ndb_applier_conflict_role="NONE";
60
61 --connection clusterB
62 SET GLOBAL ndb_applier_conflict_role="NONE";
63