3 # Set up circular cluster replication where each
4 # cluster has two mysqlds and replication directions are
15 # [--let $rpl_server_count= N]
16 # [--let $rpl_skip_check_server_ids= 1]
17 # [--let $rpl_skip_reset_master_and_slave= 1]
18 # [--let $rpl_skip_change_master= 1]
19 # [--let $rpl_skip_start_slave= 1]
20 # [--let $rpl_debug= 1]
21 # [--let $slave_timeout= NUMBER]
22 # --source include/ndb_master-slave_2ch.inc
25 # $rpl_server_count, $rpl_skip_check_server_ids,
26 # $rpl_skip_reset_master_and_slave, $rpl_skip_change_master,
27 # $rpl_skip_start_slave, $rpl_debug, $slave_timeout
28 # See include/master-slave.inc
31 --let $rpl_topology= 1->2,4->3
32 --let $rpl_skip_start_slave= 1
33 --source include/rpl_init.inc
35 # Make connections to mysqlds
37 --let $rpl_connection_name= master
38 --let $rpl_server_number= 1
39 --source include/rpl_connect.inc
41 --let $rpl_connection_name= master1
42 --let $rpl_server_number= 3
43 --source include/rpl_connect.inc
45 --let $rpl_connection_name= slave
46 --let $rpl_server_number= 2
47 --source include/rpl_connect.inc
49 --let $rpl_connection_name= slave1
50 --let $rpl_server_number= 4
51 --source include/rpl_connect.inc
53 # Now add IGNORE_SERVER_IDS
56 CHANGE MASTER TO IGNORE_SERVER_IDS= (1,3);
58 CHANGE MASTER TO IGNORE_SERVER_IDS= (1,3);
60 CHANGE MASTER TO IGNORE_SERVER_IDS= (2,4);
62 CHANGE MASTER TO IGNORE_SERVER_IDS= (2,4);
64 # Now start replication
65 --source include/rpl_start_slaves.inc
68 # Check that all mysqld are compiled with ndb support
72 --connection server_$_rpl_server
73 if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine =
'ndbcluster' AND (support =
'YES' OR support =
'DEFAULT')`)
77 --source include/ndb_not_readonly.inc
82 # Set the default connection to 'master' (cluster A)