diff options
author | unknown <skozlov/ksm@mysql.com/virtop.(none)> | 2008-04-25 00:41:04 +0400 |
---|---|---|
committer | unknown <skozlov/ksm@mysql.com/virtop.(none)> | 2008-04-25 00:41:04 +0400 |
commit | 55d18e13ca6130b80621d92b2115c946583175bc (patch) | |
tree | eaf017ca9b2e64e3d63185ea77ff9b29e96cef37 /mysql-test/include/ndb_master-slave_2ch.inc | |
parent | 0b7d39fd5fa32c0dd3bbbdf27a2bc2cbe1bcd096 (diff) | |
download | mariadb-git-55d18e13ca6130b80621d92b2115c946583175bc.tar.gz |
WL#3754, testing circular replication
mysql-test/include/circular_rpl_for_4_hosts_init.inc:
The primitive for 4 hosts non-cluster circular replication
mysql-test/include/circular_rpl_for_4_hosts_sync.inc:
The primitive for sync for 4 hosts non-cluster circular replication
mysql-test/include/ndb_master-slave_2ch.inc:
The primitive for initialization of two-channel cluster replication
mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result:
Result file
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-master.opt:
Options file
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-slave.opt:
Options file
mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test:
The test case for non-cluster circular replication A->B->C->D->A
mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result:
Result file
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-master.opt:
Options file
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-slave.opt:
Options file
mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test:
The test case for cluster circular replication by two channels
Diffstat (limited to 'mysql-test/include/ndb_master-slave_2ch.inc')
-rw-r--r-- | mysql-test/include/ndb_master-slave_2ch.inc | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/mysql-test/include/ndb_master-slave_2ch.inc b/mysql-test/include/ndb_master-slave_2ch.inc new file mode 100644 index 00000000000..52a06c01d86 --- /dev/null +++ b/mysql-test/include/ndb_master-slave_2ch.inc @@ -0,0 +1,136 @@ +############################################################# +# Author: Serge Kozlov <skozlov@mysql.com> +# Date: 03/17/2008 +# Purpose: Set up circular cluster replication where each +# cluster has two mysqlds and replication directions are +# following: +# master ---> slave +# / \ +# cluster A cluster B +# \ / +# master1 <--- slave1 +############################################################# + +--source include/have_log_bin.inc + +# Make connections to mysqlds + +connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); +connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT1,); +connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); +connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT1,); + +# Check that all mysqld compiled with ndb support + +--connection master +--disable_query_log +--require r/true.require +SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; +--source include/ndb_not_readonly.inc +--enable_query_log + +--connection master1 +--disable_query_log +--require r/true.require +SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; +--source include/ndb_not_readonly.inc +--enable_query_log + +--connection slave +--disable_query_log +--require r/true.require +SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; +--source include/ndb_not_readonly.inc +--enable_query_log + +--connection slave1 +--disable_query_log +--require r/true.require +SELECT (support = 'YES' or support = 'DEFAULT') AS `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; +--source include/ndb_not_readonly.inc +--enable_query_log + +# Stop slaves + +--connection master +--disable_warnings +STOP SLAVE; +--wait_for_slave_to_stop +--enable_warnings + +--connection master1 +--disable_warnings +STOP SLAVE; +--wait_for_slave_to_stop +--enable_warnings + +--connection slave +--disable_warnings +STOP SLAVE; +--wait_for_slave_to_stop +--enable_warnings + +--connection slave1 +--disable_warnings +STOP SLAVE; +--wait_for_slave_to_stop +--enable_warnings + +# Reset masters + +--connection master +--disable_warnings +--disable_query_log +USE test; +--enable_query_log +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +--enable_warnings +RESET MASTER; + +--connection master1 +--disable_warnings +--disable_query_log +USE test; +--enable_query_log +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +--enable_warnings +RESET MASTER; + +--connection slave +--disable_warnings +--disable_query_log +USE test; +--enable_query_log +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +--enable_warnings +RESET MASTER; + +--connection slave1 +--disable_warnings +--disable_query_log +USE test; +--enable_query_log +DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9; +--enable_warnings +RESET MASTER; + +# Start slaves + +--connection slave +RESET SLAVE; +--replace_result $MASTER_MYPORT MASTER_MYPORT +--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root' +START SLAVE; +--source include/wait_for_slave_to_start.inc + +--connection master1 +RESET SLAVE; +--replace_result $SLAVE_MYPORT1 SLAVE_MYPORT1 +--eval CHANGE MASTER TO master_host='127.0.0.1',master_port=$SLAVE_MYPORT1,master_user='root' +START SLAVE; +--source include/wait_for_slave_to_start.inc + + +# Set the default connection to 'master' (cluster A) +connection master; + |