diff --git a/mysql-test/include/circular_rpl_for_4_hosts_init.inc b/mysql-test/include/circular_rpl_for_4_hosts_init.inc index 8be6ef10b3e..ac6654777db 100644 --- a/mysql-test/include/circular_rpl_for_4_hosts_init.inc +++ b/mysql-test/include/circular_rpl_for_4_hosts_init.inc @@ -18,7 +18,7 @@ --source include/master-slave.inc # -# Set up circular ring by schema A->B->C-D->A +# Set up circular ring by schema A->B->C->D->A # --connection slave diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 4f1f83c0951..a465adca3b9 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -753,6 +753,16 @@ sub collect_one_test_case { # Add slave opts, list of extra option only for slave # ---------------------------------------------------------------------- process_opts_file($tinfo, "$testdir/$tname-slave.opt", 'slave_opt'); + + + #----------------------------------------------------------------------- + # Check for test specific config file + #----------------------------------------------------------------------- + my $test_cnf_file= "$testdir/$tname.cnf"; + if ( -f $test_cnf_file) { + # Specifies the configuration file to use for this test + $tinfo->{'template_path'}= $test_cnf_file; + } # ---------------------------------------------------------------------- # Check for test specific config file diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result index 5b775a066c4..4f0f20d88d9 100644 --- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result @@ -1,4 +1,4 @@ -*** Set up circular ring by schema A->B->C-D->A *** +*** Set up circular ring by schema A->B->C->D->A *** stop slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; reset master; diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-master.opt b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-master.opt deleted file mode 100644 index d540d4a6880..00000000000 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-num=3 --log-slave-updates --innodb diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-slave.opt b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-slave.opt deleted file mode 100644 index f5df45c8ecd..00000000000 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---log-slave-updates --innodb diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf new file mode 100644 index 00000000000..141aaa7788d --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.cnf @@ -0,0 +1,27 @@ +!include ../my.cnf + +[mysqld.1] +log-slave-updates +innodb + +[mysqld.2] +log-slave-updates +innodb + +[mysqld.3] +log-slave-updates +innodb + +[mysqld.4] +log-slave-updates +innodb + +[ENV] +SLAVE_MYPORT1= @mysqld.3.port +SLAVE_MYSOCK1= @mysqld.3.socket + +SLAVE_MYPORT2= @mysqld.4.port +SLAVE_MYSOCK2= @mysqld.4.socket + + + diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result index 5ad36e6f251..bb662542a56 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_2ch.result @@ -97,5 +97,6 @@ COUNT(*) SUM(a) b 100 64100 master1 100 64000 slave -DELETE FROM t1; +DROP TABLE t1; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index a37bd1ee6bb..4bcc9f95d05 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -12,6 +12,6 @@ rpl_ndb_circular : Bug#33849 COMMIT event missing in cluster circular replication. rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication. - +rpl_ndb_circular_2ch : Bug#33849 COMMIT event missing in cluster circular replication. # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open rpl_ndb_circular_2ch : Needs updated config diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-master.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-master.opt deleted file mode 100644 index 3462bbc05d7..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-num=2 --server-id=1 --log-bin -log-slave-updates diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-slave.opt b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-slave.opt deleted file mode 100644 index 6507907b1ed..00000000000 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch-slave.opt +++ /dev/null @@ -1 +0,0 @@ ---server-id=2 --log-bin --log-slave-updates --skip-slave-start diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf new file mode 100644 index 00000000000..27da0af1847 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf @@ -0,0 +1,35 @@ +!include ../my.cnf + +[mysqld.1.1] +server-id= 1 +log-bin +log-slave-updates + +[mysqld.2.1] +server-id= 1 +log-bin +log-slave-updates + +[mysqld.1.slave] +server-id= 2 +log-bin +log-slave-updates +skip-slave-start + +[mysqld.2.slave] +server-id= 2 +master-host= 127.0.0.1 +master-port= @mysqld.2.1.port +master-password= @mysqld.2.1.#password +master-user= @mysqld.2.1.#user +master-connect-retry= 1 +init-rpl-role= slave +log-bin +log-slave-updates +skip-slave-start +ndb_connectstring= @mysql_cluster.slave.ndb_connectstring + +[ENV] + +SLAVE_MYPORT1= @mysqld.2.slave.port +SLAVE_MYSOCK1= @mysqld.2.slave.socket diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test index beaa2739b23..abd2144b80c 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_2ch.test @@ -170,10 +170,11 @@ SELECT COUNT(*), SUM(a), b FROM t1 WHERE c = 3 GROUP BY b ORDER BY b; # Clean up --connection master -DELETE FROM t1; +DROP TABLE t1; --connection slave -let $wait_condition= SELECT COUNT(*)=0 FROM t1; ---source include/wait_condition.inc +--disable_warings +DROP TABLE IF EXISTS t1; +--enable_warnings --echo # End of test 5.1