summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-06-18 15:36:10 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-06-18 15:36:10 +0200
commit2c631fe88090d991875cb7a72928387f1fd03715 (patch)
tree5335465d31dc4db1adb5e80f2ff0f78523a56886
parent9b1aa63ec639ed9deece356672c080a7a02eecc0 (diff)
downloadmariadb-git-2c631fe88090d991875cb7a72928387f1fd03715.tar.gz
fixes Bug #25305 (and several other similar test tailures with the same symptom)
- make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_commit_after_flush.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_delete_no_where.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_insert_ignore.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_log.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_multi_update2.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_multi_update3.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_relayrotate.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_001.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_UUID.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_basic.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_blob.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_charset.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_func003.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_sp003.test: make tests wait until ndb connects properly mysql-test/extra/rpl_tests/rpl_row_sp006.test: make tests wait until ndb connects properly mysql-test/include/have_multi_ndb.inc: make tests wait until ndb connects properly mysql-test/include/have_ndb.inc: make tests wait until ndb connects properly mysql-test/include/ndb_not_readonly.inc: make tests wait until ndb connects properly mysql-test/t/rpl_commit_after_flush.test: make tests wait until ndb connects properly mysql-test/t/rpl_delete_no_where.test: make tests wait until ndb connects properly mysql-test/t/rpl_insert_ignore.test: make tests wait until ndb connects properly mysql-test/t/rpl_multi_update2.test: make tests wait until ndb connects properly mysql-test/t/rpl_multi_update3.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_2innodb.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_2myisam.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_UUID.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_auto_inc.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_bank.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_basic.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_blob.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_blob2.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_charset.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_circular.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_circular_simplex.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_commit_afterflush.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_dd_advance.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_dd_basic.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_dd_partitions.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_ddl.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_delete_nowhere.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_do_db.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_do_table.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_extraCol.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_func003.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_idempotent.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_innodb2ndb.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_innodb_trans.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_insert_ignore.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_load.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_log.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_multi.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_multi_update2.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_multi_update3.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_myisam2ndb.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_relayrotate.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_rep_ignore.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_row_001.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_sp003.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_sp006.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_stm_innodb.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_sync.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndb_trig004.test: make tests wait until ndb connects properly mysql-test/t/rpl_ndbapi_multi.test: make tests wait until ndb connects properly mysql-test/t/rpl_relayrotate.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_001.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_UUID.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_basic_2myisam.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_basic_3innodb.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_basic_7ndb.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_blob_innodb.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_blob_myisam.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_charset.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_func003.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_log.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_log_innodb.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_sp003.test: make tests wait until ndb connects properly mysql-test/t/rpl_row_sp006_InnoDB.test: make tests wait until ndb connects properly mysql-test/t/rpl_stm_log.test: make tests wait until ndb connects properly mysql-test/t/rpl_truncate_7ndb.test: make tests wait until ndb connects properly mysql-test/include/ndb_master-slave.inc: New BitKeeper file ``mysql-test/include/ndb_master-slave.inc''
-rw-r--r--mysql-test/extra/rpl_tests/rpl_commit_after_flush.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_delete_no_where.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_insert_ignore.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_log.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_multi_update2.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_multi_update3.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_relayrotate.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_001.test3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_UUID.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test3
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_blob.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_charset.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_func003.test5
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_sp003.test5
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_sp006.test4
-rw-r--r--mysql-test/include/have_multi_ndb.inc6
-rw-r--r--mysql-test/include/have_ndb.inc5
-rw-r--r--mysql-test/include/ndb_master-slave.inc12
-rw-r--r--mysql-test/include/ndb_not_readonly.inc44
-rw-r--r--mysql-test/t/rpl_commit_after_flush.test1
-rw-r--r--mysql-test/t/rpl_delete_no_where.test1
-rw-r--r--mysql-test/t/rpl_insert_ignore.test1
-rw-r--r--mysql-test/t/rpl_multi_update2.test1
-rw-r--r--mysql-test/t/rpl_multi_update3.test1
-rw-r--r--mysql-test/t/rpl_ndb_2innodb.test2
-rw-r--r--mysql-test/t/rpl_ndb_2myisam.test2
-rw-r--r--mysql-test/t/rpl_ndb_UUID.test2
-rw-r--r--mysql-test/t/rpl_ndb_auto_inc.test2
-rw-r--r--mysql-test/t/rpl_ndb_bank.test2
-rw-r--r--mysql-test/t/rpl_ndb_basic.test2
-rw-r--r--mysql-test/t/rpl_ndb_blob.test2
-rw-r--r--mysql-test/t/rpl_ndb_blob2.test2
-rw-r--r--mysql-test/t/rpl_ndb_charset.test2
-rw-r--r--mysql-test/t/rpl_ndb_circular.test2
-rw-r--r--mysql-test/t/rpl_ndb_circular_simplex.test2
-rw-r--r--mysql-test/t/rpl_ndb_commit_afterflush.test1
-rw-r--r--mysql-test/t/rpl_ndb_dd_advance.test2
-rw-r--r--mysql-test/t/rpl_ndb_dd_basic.test2
-rw-r--r--mysql-test/t/rpl_ndb_dd_partitions.test2
-rw-r--r--mysql-test/t/rpl_ndb_ddl.test2
-rw-r--r--mysql-test/t/rpl_ndb_delete_nowhere.test1
-rw-r--r--mysql-test/t/rpl_ndb_do_db.test2
-rw-r--r--mysql-test/t/rpl_ndb_do_table.test2
-rw-r--r--mysql-test/t/rpl_ndb_extraCol.test4
-rw-r--r--mysql-test/t/rpl_ndb_func003.test2
-rw-r--r--mysql-test/t/rpl_ndb_idempotent.test2
-rw-r--r--mysql-test/t/rpl_ndb_innodb2ndb.test6
-rw-r--r--mysql-test/t/rpl_ndb_innodb_trans.test2
-rw-r--r--mysql-test/t/rpl_ndb_insert_ignore.test1
-rw-r--r--mysql-test/t/rpl_ndb_load.test2
-rw-r--r--mysql-test/t/rpl_ndb_log.test1
-rw-r--r--mysql-test/t/rpl_ndb_multi.test3
-rw-r--r--mysql-test/t/rpl_ndb_multi_update2.test1
-rw-r--r--mysql-test/t/rpl_ndb_multi_update3.test1
-rw-r--r--mysql-test/t/rpl_ndb_myisam2ndb.test5
-rw-r--r--mysql-test/t/rpl_ndb_relayrotate.test1
-rw-r--r--mysql-test/t/rpl_ndb_rep_ignore.test2
-rw-r--r--mysql-test/t/rpl_ndb_row_001.test2
-rw-r--r--mysql-test/t/rpl_ndb_sp003.test2
-rw-r--r--mysql-test/t/rpl_ndb_sp006.test2
-rw-r--r--mysql-test/t/rpl_ndb_stm_innodb.test2
-rw-r--r--mysql-test/t/rpl_ndb_sync.test2
-rw-r--r--mysql-test/t/rpl_ndb_trig004.test2
-rw-r--r--mysql-test/t/rpl_ndbapi_multi.test2
-rw-r--r--mysql-test/t/rpl_relayrotate.test1
-rw-r--r--mysql-test/t/rpl_row_001.test2
-rw-r--r--mysql-test/t/rpl_row_UUID.test2
-rw-r--r--mysql-test/t/rpl_row_basic_2myisam.test3
-rw-r--r--mysql-test/t/rpl_row_basic_3innodb.test2
-rw-r--r--mysql-test/t/rpl_row_basic_7ndb.test3
-rw-r--r--mysql-test/t/rpl_row_blob_innodb.test2
-rw-r--r--mysql-test/t/rpl_row_blob_myisam.test2
-rw-r--r--mysql-test/t/rpl_row_charset.test2
-rw-r--r--mysql-test/t/rpl_row_func003.test2
-rw-r--r--mysql-test/t/rpl_row_log.test1
-rw-r--r--mysql-test/t/rpl_row_log_innodb.test1
-rw-r--r--mysql-test/t/rpl_row_sp003.test2
-rw-r--r--mysql-test/t/rpl_row_sp006_InnoDB.test2
-rw-r--r--mysql-test/t/rpl_stm_log.test1
-rw-r--r--mysql-test/t/rpl_truncate_7ndb.test2
80 files changed, 118 insertions, 112 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test b/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test
index d63d7e4b07d..98638b0b1f6 100644
--- a/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test
+++ b/mysql-test/extra/rpl_tests/rpl_commit_after_flush.test
@@ -2,8 +2,6 @@
# Test updated to use a wrapper #
#################################
--- source include/master-slave.inc
-
eval CREATE TABLE t1 (a INT) ENGINE=$engine_type;
begin;
diff --git a/mysql-test/extra/rpl_tests/rpl_delete_no_where.test b/mysql-test/extra/rpl_tests/rpl_delete_no_where.test
index 4db9e0fb63f..914bedc6b67 100644
--- a/mysql-test/extra/rpl_tests/rpl_delete_no_where.test
+++ b/mysql-test/extra/rpl_tests/rpl_delete_no_where.test
@@ -2,8 +2,6 @@
# (not internally row-per-row but more like a TRUNCATE, MyISAM
# supports that), is replicated (BUG#13576).
--- source include/master-slave.inc
-
eval create table t1 (a int, b int) engine=$engine_type;
insert into t1 values(1,1);
sync_slave_with_master;
diff --git a/mysql-test/extra/rpl_tests/rpl_insert_ignore.test b/mysql-test/extra/rpl_tests/rpl_insert_ignore.test
index 207b53b6fb4..43d45ef6c60 100644
--- a/mysql-test/extra/rpl_tests/rpl_insert_ignore.test
+++ b/mysql-test/extra/rpl_tests/rpl_insert_ignore.test
@@ -5,8 +5,6 @@
# Slave needs to be started with --innodb to store table in InnoDB.
# Same test for MyISAM (which had no bug).
--- source include/master-slave.inc
-
eval CREATE TABLE t1 (
a int unsigned not null auto_increment primary key,
b int unsigned,
diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test
index 932fcdf670b..b3a0b513705 100644
--- a/mysql-test/extra/rpl_tests/rpl_log.test
+++ b/mysql-test/extra/rpl_tests/rpl_log.test
@@ -1,5 +1,4 @@
# Requires statement logging
--- source include/master-slave.inc
# Clean up old slave's binlogs.
# The slave is started with --log-slave-updates
diff --git a/mysql-test/extra/rpl_tests/rpl_multi_update2.test b/mysql-test/extra/rpl_tests/rpl_multi_update2.test
index 0adf0053425..ae4261c0516 100644
--- a/mysql-test/extra/rpl_tests/rpl_multi_update2.test
+++ b/mysql-test/extra/rpl_tests/rpl_multi_update2.test
@@ -2,8 +2,6 @@
# some replicate-* rules exist.
# (BUG#7011)
-source include/master-slave.inc;
-
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
diff --git a/mysql-test/extra/rpl_tests/rpl_multi_update3.test b/mysql-test/extra/rpl_tests/rpl_multi_update3.test
index 797e385e509..6c7a980aecb 100644
--- a/mysql-test/extra/rpl_tests/rpl_multi_update3.test
+++ b/mysql-test/extra/rpl_tests/rpl_multi_update3.test
@@ -1,5 +1,3 @@
--- source include/master-slave.inc
-
##############################################################################
#
# Let's verify that multi-update with a subselect does not cause the slave to crash
diff --git a/mysql-test/extra/rpl_tests/rpl_relayrotate.test b/mysql-test/extra/rpl_tests/rpl_relayrotate.test
index 0d2f25e2b4a..28670fe0985 100644
--- a/mysql-test/extra/rpl_tests/rpl_relayrotate.test
+++ b/mysql-test/extra/rpl_tests/rpl_relayrotate.test
@@ -8,8 +8,6 @@
# The slave is started with max_binlog_size=16384 bytes,
# to force many rotations (approximately 30 rotations)
--- source include/master-slave.inc
-
# We have to sync with master, to ensure slave had time to start properly
# before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the log.
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_001.test b/mysql-test/extra/rpl_tests/rpl_row_001.test
index 9bdfae81093..6261659c4ce 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_001.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_001.test
@@ -1,6 +1,3 @@
--- source include/master-slave.inc
--- source include/have_binlog_format_row.inc
-
CREATE TABLE t1 (word CHAR(20) NOT NULL);
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
diff --git a/mysql-test/extra/rpl_tests/rpl_row_UUID.test b/mysql-test/extra/rpl_tests/rpl_row_UUID.test
index b3fa2fabe2c..ee2a29ac938 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_UUID.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_UUID.test
@@ -5,10 +5,6 @@
# TEST: To test the UUID() in rbr #
#############################################################################
-# Includes
--- source include/have_binlog_format_row.inc
--- source include/master-slave.inc
-
# Begin clean up test section
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index 9ba06096faf..27740afd587 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -1,6 +1,3 @@
---source include/have_binlog_format_row.inc
---source include/master-slave.inc
-
#
# Basic tests of row-level logging
#
diff --git a/mysql-test/extra/rpl_tests/rpl_row_blob.test b/mysql-test/extra/rpl_tests/rpl_row_blob.test
index 2dc6867df32..080df7d75dd 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_blob.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_blob.test
@@ -5,10 +5,6 @@
# correctly.
################################################
-# Includes
--- source include/have_binlog_format_row.inc
--- source include/master-slave.inc
-
# Pre test clean up section
connection master;
--disable_warnings
diff --git a/mysql-test/extra/rpl_tests/rpl_row_charset.test b/mysql-test/extra/rpl_tests/rpl_row_charset.test
index 4ce5245a79a..a21ed5bb841 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_charset.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_charset.test
@@ -1,10 +1,6 @@
# Replication of character sets.
# This test will fail if the server/client does not support enough charsets.
-# Requires statement logging
--- source include/have_binlog_format_row.inc
-
--- source include/master-slave.inc
--disable_warnings
set timestamp=1000000000;
drop database if exists mysqltest2;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_func003.test b/mysql-test/extra/rpl_tests/rpl_row_func003.test
index 662f1454096..8ee2d863527 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_func003.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test
@@ -18,11 +18,6 @@
# Vs slave. #
#############################################################################
-# Includes
--- source include/have_binlog_format_row.inc
--- source include/master-slave.inc
-
-
# Begin clean up test section
connection master;
--disable_warnings
diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp003.test b/mysql-test/extra/rpl_tests/rpl_row_sp003.test
index df318ee0c0b..7cf3d0fa19c 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_sp003.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_sp003.test
@@ -3,11 +3,6 @@
# Original Date: Aug/13/2005 Created from Bug 12335 #
#############################################################################
-# Includes
--- source include/have_binlog_format_row.inc
--- source include/master-slave.inc
-
-
# Begin clean up test section
connection master;
--disable_warnings
diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp006.test b/mysql-test/extra/rpl_tests/rpl_row_sp006.test
index da9206d7d3f..897d7e492bf 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_sp006.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_sp006.test
@@ -8,10 +8,6 @@
# to populate a table with data from the first table. #
#############################################################################
-# Includes
--- source include/have_binlog_format_row.inc
--- source include/master-slave.inc
-
# Begin clean up test section
connection master;
--disable_warnings
diff --git a/mysql-test/include/have_multi_ndb.inc b/mysql-test/include/have_multi_ndb.inc
index 819518b2674..24c9acb5f61 100644
--- a/mysql-test/include/have_multi_ndb.inc
+++ b/mysql-test/include/have_multi_ndb.inc
@@ -11,6 +11,7 @@ drop table if exists t1, t2;
flush tables;
--require r/true.require
select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+--source include/ndb_not_readonly.inc
enable_query_log;
# Check that server2 has NDB support
@@ -22,11 +23,8 @@ drop table if exists t1, t2;
flush tables;
--require r/true.require
select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+--source include/ndb_not_readonly.inc
enable_query_log;
-# Check should be here as well...
-# # Check that second master mysqld has come out of redonly mode
-# --source include/ndb_not_readonly.inc
-
# Set the default connection to 'server1'
connection server1;
diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc
index c9603634508..cb2f2f7cd9e 100644
--- a/mysql-test/include/have_ndb.inc
+++ b/mysql-test/include/have_ndb.inc
@@ -2,8 +2,5 @@
disable_query_log;
--require r/true.require
select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+--source include/ndb_not_readonly.inc
enable_query_log;
-
-
-
-
diff --git a/mysql-test/include/ndb_master-slave.inc b/mysql-test/include/ndb_master-slave.inc
new file mode 100644
index 00000000000..81dd63be78a
--- /dev/null
+++ b/mysql-test/include/ndb_master-slave.inc
@@ -0,0 +1,12 @@
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
+connect (slave1,127.0.0.1,root,,test,$SLAVE_MYPORT,);
+
+connection slave;
+-- source include/have_ndb.inc
+
+-- source include/master-slave-reset.inc
+
+# Set the default connection to 'master'
+connection master;
diff --git a/mysql-test/include/ndb_not_readonly.inc b/mysql-test/include/ndb_not_readonly.inc
index df67dced8ab..b841b492cc0 100644
--- a/mysql-test/include/ndb_not_readonly.inc
+++ b/mysql-test/include/ndb_not_readonly.inc
@@ -1,31 +1,27 @@
# Check that server has come out ot readonly mode
---disable_query_log
-let $counter= 100;
+#
+# wait for server to connect properly to cluster
+#
+--error 0,ER_CHECK_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND
+delete from mysql.ndb_apply_status where server_id=0;
let $mysql_errno= 1;
+let $counter= 600;
while ($mysql_errno)
{
- --error 0, 1005
- create table check_read_only(a int) engine=NDB;
- sleep 0.1;
- if (!$counter)
+ # Table is readonly until the mysqld has connected properly
+ --error 0,ER_CHECK_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG
+ replace into mysql.ndb_apply_status values(0,0,"",0,0);
+ if ($mysql_errno)
{
- die("Failed while waiting for mysqld to come out of readonly mode");
+ if (!$counter)
+ {
+ die("Failed while waiting for mysqld to come out of readonly mode");
+ }
+ dec $counter;
+ --sleep 0.1
}
- dec $counter;
}
-
-let $counter= 100;
-let $mysql_errno= 1;
-while ($mysql_errno)
-{
- --error 0, 1036
- insert into check_read_only values(1);
- sleep 0.1;
- if (!$counter)
- {
- die("Failed while waiting for mysqld to come out of readonly mode");
- }
- dec $counter;
-}
-drop table check_read_only;
---enable_query_log
+delete from mysql.ndb_apply_status where server_id=0;
+#
+# connected
+#
diff --git a/mysql-test/t/rpl_commit_after_flush.test b/mysql-test/t/rpl_commit_after_flush.test
index 7a924ddb11e..47df391d6be 100644
--- a/mysql-test/t/rpl_commit_after_flush.test
+++ b/mysql-test/t/rpl_commit_after_flush.test
@@ -7,5 +7,6 @@
########################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/master-slave.inc
let $engine_type=innodb;
-- source extra/rpl_tests/rpl_commit_after_flush.test
diff --git a/mysql-test/t/rpl_delete_no_where.test b/mysql-test/t/rpl_delete_no_where.test
index 11adb2e6dd5..64a293b4058 100644
--- a/mysql-test/t/rpl_delete_no_where.test
+++ b/mysql-test/t/rpl_delete_no_where.test
@@ -2,5 +2,6 @@
# By JBM 2006-02-14 added to skip test when NDB #
##################################################
-- source include/not_ndb_default.inc
+-- source include/master-slave.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_delete_no_where.test
diff --git a/mysql-test/t/rpl_insert_ignore.test b/mysql-test/t/rpl_insert_ignore.test
index dc8994b82f3..2709430f85d 100644
--- a/mysql-test/t/rpl_insert_ignore.test
+++ b/mysql-test/t/rpl_insert_ignore.test
@@ -3,6 +3,7 @@
#####################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/master-slave.inc
let $engine_type=innodb;
let $engine_type2=myisam;
-- source extra/rpl_tests/rpl_insert_ignore.test
diff --git a/mysql-test/t/rpl_multi_update2.test b/mysql-test/t/rpl_multi_update2.test
index 7401786501e..812a486ad69 100644
--- a/mysql-test/t/rpl_multi_update2.test
+++ b/mysql-test/t/rpl_multi_update2.test
@@ -5,5 +5,6 @@
# Default engine. #
#######################################################
--source include/not_ndb_default.inc
+--source include/master-slave.inc
let $engine_type=MyISAM;
--source extra/rpl_tests/rpl_multi_update2.test
diff --git a/mysql-test/t/rpl_multi_update3.test b/mysql-test/t/rpl_multi_update3.test
index 438a644729c..5da91c26b04 100644
--- a/mysql-test/t/rpl_multi_update3.test
+++ b/mysql-test/t/rpl_multi_update3.test
@@ -5,5 +5,6 @@
# Default engine. #
#######################################################
--source include/not_ndb_default.inc
+--source include/master-slave.inc
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_multi_update3.test
diff --git a/mysql-test/t/rpl_ndb_2innodb.test b/mysql-test/t/rpl_ndb_2innodb.test
index e09d8b6685b..30e4e49eb7a 100644
--- a/mysql-test/t/rpl_ndb_2innodb.test
+++ b/mysql-test/t/rpl_ndb_2innodb.test
@@ -8,7 +8,7 @@
# test and to have control over the tests.
##############################################################
-- source include/have_ndb.inc
--- source include/master-slave.inc
+-- source include/ndb_master-slave.inc
connection slave;
-- source include/have_innodb.inc
connection master;
diff --git a/mysql-test/t/rpl_ndb_2myisam.test b/mysql-test/t/rpl_ndb_2myisam.test
index abbe419bc02..182d4c72d87 100644
--- a/mysql-test/t/rpl_ndb_2myisam.test
+++ b/mysql-test/t/rpl_ndb_2myisam.test
@@ -8,6 +8,6 @@
# test and to have control over the tests.
##############################################################
-- source include/have_ndb.inc
--- source include/master-slave.inc
+-- source include/ndb_master-slave.inc
SET storage_engine=ndb;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
diff --git a/mysql-test/t/rpl_ndb_UUID.test b/mysql-test/t/rpl_ndb_UUID.test
index c6fc218beed..7bae9a341a4 100644
--- a/mysql-test/t/rpl_ndb_UUID.test
+++ b/mysql-test/t/rpl_ndb_UUID.test
@@ -2,5 +2,7 @@
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
########################################################
--source include/have_ndb.inc
+--source include/have_binlog_format_row.inc
+--source include/ndb_master-slave.inc
let $engine_type=NDB;
--source extra/rpl_tests/rpl_row_UUID.test
diff --git a/mysql-test/t/rpl_ndb_auto_inc.test b/mysql-test/t/rpl_ndb_auto_inc.test
index 53bb7e764f1..5e0584e332a 100644
--- a/mysql-test/t/rpl_ndb_auto_inc.test
+++ b/mysql-test/t/rpl_ndb_auto_inc.test
@@ -7,8 +7,8 @@
# Change: Augmented test to use with cluster
#####################################
--source include/have_ndb.inc
---source include/master-slave.inc
--source include/have_binlog_format_mixed_or_row.inc
+--source include/ndb_master-slave.inc
--echo ***************** Test 1 ************************
--echo
diff --git a/mysql-test/t/rpl_ndb_bank.test b/mysql-test/t/rpl_ndb_bank.test
index c1448573f5b..4e946cb2399 100644
--- a/mysql-test/t/rpl_ndb_bank.test
+++ b/mysql-test/t/rpl_ndb_bank.test
@@ -13,7 +13,7 @@
--source include/have_ndb.inc
--source include/have_ndb_extra.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
# kill any trailing processes
--system killall lt-bankTransactionMaker lt-bankTimer lt-bankMakeGL || true
diff --git a/mysql-test/t/rpl_ndb_basic.test b/mysql-test/t/rpl_ndb_basic.test
index 04c855f8730..f2119413ddb 100644
--- a/mysql-test/t/rpl_ndb_basic.test
+++ b/mysql-test/t/rpl_ndb_basic.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
diff --git a/mysql-test/t/rpl_ndb_blob.test b/mysql-test/t/rpl_ndb_blob.test
index 94af986b222..aa80ab8ede5 100644
--- a/mysql-test/t/rpl_ndb_blob.test
+++ b/mysql-test/t/rpl_ndb_blob.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
#
# basic test of blob replication for NDB
diff --git a/mysql-test/t/rpl_ndb_blob2.test b/mysql-test/t/rpl_ndb_blob2.test
index 2e8f02eaf75..d94294eedcb 100644
--- a/mysql-test/t/rpl_ndb_blob2.test
+++ b/mysql-test/t/rpl_ndb_blob2.test
@@ -4,6 +4,8 @@
# code between engine tests #
#################################
-- source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDBCLUSTER;
-- source extra/rpl_tests/rpl_row_blob.test
diff --git a/mysql-test/t/rpl_ndb_charset.test b/mysql-test/t/rpl_ndb_charset.test
index eb412a0349a..4bac267443e 100644
--- a/mysql-test/t/rpl_ndb_charset.test
+++ b/mysql-test/t/rpl_ndb_charset.test
@@ -2,5 +2,7 @@
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
########################################################
--source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_charset.test
diff --git a/mysql-test/t/rpl_ndb_circular.test b/mysql-test/t/rpl_ndb_circular.test
index 88b5808160b..34fcf968199 100644
--- a/mysql-test/t/rpl_ndb_circular.test
+++ b/mysql-test/t/rpl_ndb_circular.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
# set up circular replication
diff --git a/mysql-test/t/rpl_ndb_circular_simplex.test b/mysql-test/t/rpl_ndb_circular_simplex.test
index 2ea60beaba2..633bbd75006 100644
--- a/mysql-test/t/rpl_ndb_circular_simplex.test
+++ b/mysql-test/t/rpl_ndb_circular_simplex.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
connection master;
CREATE TABLE t1 (a int key, b int) ENGINE=NDB;
diff --git a/mysql-test/t/rpl_ndb_commit_afterflush.test b/mysql-test/t/rpl_ndb_commit_afterflush.test
index ce2a4d9506c..8c45ac5dbdd 100644
--- a/mysql-test/t/rpl_ndb_commit_afterflush.test
+++ b/mysql-test/t/rpl_ndb_commit_afterflush.test
@@ -5,5 +5,6 @@
# By JBM 2004-02-15 #
#####################################
-- source include/have_ndb.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_commit_after_flush.test
diff --git a/mysql-test/t/rpl_ndb_dd_advance.test b/mysql-test/t/rpl_ndb_dd_advance.test
index 0a1ab37cdad..5e346d5fe3b 100644
--- a/mysql-test/t/rpl_ndb_dd_advance.test
+++ b/mysql-test/t/rpl_ndb_dd_advance.test
@@ -11,7 +11,7 @@
--source include/not_embedded.inc
--source include/big_test.inc
#--source include/have_ndb_extra.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
#### Test start cleanup section #####
--disable_warnings
diff --git a/mysql-test/t/rpl_ndb_dd_basic.test b/mysql-test/t/rpl_ndb_dd_basic.test
index 7387d39db87..ca583860b91 100644
--- a/mysql-test/t/rpl_ndb_dd_basic.test
+++ b/mysql-test/t/rpl_ndb_dd_basic.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/t/rpl_ndb_dd_partitions.test b/mysql-test/t/rpl_ndb_dd_partitions.test
index 9291f38e8db..fe6db98dd13 100644
--- a/mysql-test/t/rpl_ndb_dd_partitions.test
+++ b/mysql-test/t/rpl_ndb_dd_partitions.test
@@ -7,7 +7,7 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--echo --- Doing pre test cleanup ---
diff --git a/mysql-test/t/rpl_ndb_ddl.test b/mysql-test/t/rpl_ndb_ddl.test
index ca7a4ce4968..dbf2960dfa8 100644
--- a/mysql-test/t/rpl_ndb_ddl.test
+++ b/mysql-test/t/rpl_ndb_ddl.test
@@ -23,8 +23,8 @@
# abort of the test case etc..
#
---source include/master-slave.inc
--source include/have_ndb.inc
+--source include/ndb_master-slave.inc
let $engine_type= NDB;
let $temp_engine_type= MEMORY;
let $show_binlog = 0;
diff --git a/mysql-test/t/rpl_ndb_delete_nowhere.test b/mysql-test/t/rpl_ndb_delete_nowhere.test
index 92ceddf7f5c..49ba07b2fde 100644
--- a/mysql-test/t/rpl_ndb_delete_nowhere.test
+++ b/mysql-test/t/rpl_ndb_delete_nowhere.test
@@ -4,5 +4,6 @@
#########################################
--source include/have_ndb.inc
-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_delete_no_where.test
diff --git a/mysql-test/t/rpl_ndb_do_db.test b/mysql-test/t/rpl_ndb_do_db.test
index 9b65d43f244..3e450a1fe4b 100644
--- a/mysql-test/t/rpl_ndb_do_db.test
+++ b/mysql-test/t/rpl_ndb_do_db.test
@@ -7,7 +7,7 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--disable_warnings
DROP DATABASE IF EXISTS replica;
diff --git a/mysql-test/t/rpl_ndb_do_table.test b/mysql-test/t/rpl_ndb_do_table.test
index 700c79766e1..baf8083ca02 100644
--- a/mysql-test/t/rpl_ndb_do_table.test
+++ b/mysql-test/t/rpl_ndb_do_table.test
@@ -7,7 +7,7 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
diff --git a/mysql-test/t/rpl_ndb_extraCol.test b/mysql-test/t/rpl_ndb_extraCol.test
index cf0501c490a..292b8bbfa45 100644
--- a/mysql-test/t/rpl_ndb_extraCol.test
+++ b/mysql-test/t/rpl_ndb_extraCol.test
@@ -5,8 +5,8 @@
# Using NDB
###########################################
-- source include/have_binlog_format_row.inc
---source include/have_ndb.inc
--- source include/master-slave.inc
+-- source include/have_ndb.inc
+-- source include/ndb_master-slave.inc
let $engine_type = 'NDB';
-- source extra/rpl_tests/rpl_extraSlave_Col.test
diff --git a/mysql-test/t/rpl_ndb_func003.test b/mysql-test/t/rpl_ndb_func003.test
index a19de7d3d6b..f91c891f943 100644
--- a/mysql-test/t/rpl_ndb_func003.test
+++ b/mysql-test/t/rpl_ndb_func003.test
@@ -7,6 +7,8 @@
# reduce test case code #
###################################
-- source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_func003.test
-- source include/master-slave-end.inc
diff --git a/mysql-test/t/rpl_ndb_idempotent.test b/mysql-test/t/rpl_ndb_idempotent.test
index f2bfe745523..da47bf7e0fd 100644
--- a/mysql-test/t/rpl_ndb_idempotent.test
+++ b/mysql-test/t/rpl_ndb_idempotent.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
#
# Currently test only works with ndb since it retrieves "old"
diff --git a/mysql-test/t/rpl_ndb_innodb2ndb.test b/mysql-test/t/rpl_ndb_innodb2ndb.test
index 229ee11353b..8f67802c055 100644
--- a/mysql-test/t/rpl_ndb_innodb2ndb.test
+++ b/mysql-test/t/rpl_ndb_innodb2ndb.test
@@ -7,10 +7,8 @@
# to be able to use the same code for all these different
# test and to have control over the tests.
##############################################################
--- source include/have_innodb.inc
--- source include/master-slave.inc
-connection slave;
-- source include/have_ndb.inc
-connection master;
+-- source include/have_innodb.inc
+-- source include/ndb_master-slave.inc
SET storage_engine=innodb;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
diff --git a/mysql-test/t/rpl_ndb_innodb_trans.test b/mysql-test/t/rpl_ndb_innodb_trans.test
index 127c2464570..2f2414ba578 100644
--- a/mysql-test/t/rpl_ndb_innodb_trans.test
+++ b/mysql-test/t/rpl_ndb_innodb_trans.test
@@ -2,7 +2,7 @@
-- source include/have_ndb.inc
-- source include/have_innodb.inc
--- source include/master-slave.inc
+-- source include/ndb_master-slave.inc
create table t1 (a int, unique(a)) engine=ndbcluster;
create table t2 (a int, unique(a)) engine=innodb;
diff --git a/mysql-test/t/rpl_ndb_insert_ignore.test b/mysql-test/t/rpl_ndb_insert_ignore.test
index 17acb5983f4..5137c81c0cd 100644
--- a/mysql-test/t/rpl_ndb_insert_ignore.test
+++ b/mysql-test/t/rpl_ndb_insert_ignore.test
@@ -3,6 +3,7 @@
#####################################
-- source include/have_ndb.inc
-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
let $engine_type2=myisam;
-- source extra/rpl_tests/rpl_insert_ignore.test
diff --git a/mysql-test/t/rpl_ndb_load.test b/mysql-test/t/rpl_ndb_load.test
index 2ee540afd18..a695eee3221 100644
--- a/mysql-test/t/rpl_ndb_load.test
+++ b/mysql-test/t/rpl_ndb_load.test
@@ -7,7 +7,7 @@
--source include/have_ndb.inc
--source include/have_ndb_extra.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--disable_warnings
# reset master
diff --git a/mysql-test/t/rpl_ndb_log.test b/mysql-test/t/rpl_ndb_log.test
index e883d24b977..d32a05bf92a 100644
--- a/mysql-test/t/rpl_ndb_log.test
+++ b/mysql-test/t/rpl_ndb_log.test
@@ -7,6 +7,7 @@
###################################
-- source include/have_binlog_format_row.inc
-- source include/have_ndb.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_log.test
diff --git a/mysql-test/t/rpl_ndb_multi.test b/mysql-test/t/rpl_ndb_multi.test
index 196d0a5ed6f..ab92b65ba19 100644
--- a/mysql-test/t/rpl_ndb_multi.test
+++ b/mysql-test/t/rpl_ndb_multi.test
@@ -1,7 +1,6 @@
---source include/have_ndb.inc
--source include/have_multi_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
# note: server2 is another "master" connected to the master cluster
diff --git a/mysql-test/t/rpl_ndb_multi_update2.test b/mysql-test/t/rpl_ndb_multi_update2.test
index df4f0eec39d..75f4b63aae2 100644
--- a/mysql-test/t/rpl_ndb_multi_update2.test
+++ b/mysql-test/t/rpl_ndb_multi_update2.test
@@ -7,6 +7,7 @@
# Run this only for row based replication, as replication of
# auto_increment values are not supported with NDB as storage engine
-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
--source extra/rpl_tests/rpl_multi_update2.test
diff --git a/mysql-test/t/rpl_ndb_multi_update3.test b/mysql-test/t/rpl_ndb_multi_update3.test
index 008e2143987..fbf44d66408 100644
--- a/mysql-test/t/rpl_ndb_multi_update3.test
+++ b/mysql-test/t/rpl_ndb_multi_update3.test
@@ -4,5 +4,6 @@
############################################################
-- source include/have_ndb.inc
-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_multi_update3.test
diff --git a/mysql-test/t/rpl_ndb_myisam2ndb.test b/mysql-test/t/rpl_ndb_myisam2ndb.test
index 0c2df6441cb..2ed151b7a87 100644
--- a/mysql-test/t/rpl_ndb_myisam2ndb.test
+++ b/mysql-test/t/rpl_ndb_myisam2ndb.test
@@ -7,9 +7,6 @@
# to be able to use the same code for all these different
# test and to have control over the tests.
##############################################################
--- source include/master-slave.inc
-connection slave;
---source include/have_ndb.inc
-connection master;
+-- source include/ndb_master-slave.inc
SET storage_engine=myisam;
--source extra/rpl_tests/rpl_ndb_2multi_eng.test
diff --git a/mysql-test/t/rpl_ndb_relayrotate.test b/mysql-test/t/rpl_ndb_relayrotate.test
index c5ec0e1d21b..b0b9dd9e7da 100644
--- a/mysql-test/t/rpl_ndb_relayrotate.test
+++ b/mysql-test/t/rpl_ndb_relayrotate.test
@@ -4,5 +4,6 @@
############################################################
-- source include/have_ndb.inc
-- source include/have_ndb_extra.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_relayrotate.test
diff --git a/mysql-test/t/rpl_ndb_rep_ignore.test b/mysql-test/t/rpl_ndb_rep_ignore.test
index 47f5bce5527..f010d96b5ee 100644
--- a/mysql-test/t/rpl_ndb_rep_ignore.test
+++ b/mysql-test/t/rpl_ndb_rep_ignore.test
@@ -8,7 +8,7 @@
--source include/have_ndb.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--disable_warnings
DROP DATABASE IF EXISTS replica;
diff --git a/mysql-test/t/rpl_ndb_row_001.test b/mysql-test/t/rpl_ndb_row_001.test
index 1e2a4ec02df..4429ea177d3 100644
--- a/mysql-test/t/rpl_ndb_row_001.test
+++ b/mysql-test/t/rpl_ndb_row_001.test
@@ -2,5 +2,7 @@
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
########################################################
--source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_row_001.test
diff --git a/mysql-test/t/rpl_ndb_sp003.test b/mysql-test/t/rpl_ndb_sp003.test
index 75ad9f0a488..1774a313851 100644
--- a/mysql-test/t/rpl_ndb_sp003.test
+++ b/mysql-test/t/rpl_ndb_sp003.test
@@ -5,5 +5,7 @@
# For different engines #
#################################
-- source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDBCLUSTER;
-- source extra/rpl_tests/rpl_row_sp003.test
diff --git a/mysql-test/t/rpl_ndb_sp006.test b/mysql-test/t/rpl_ndb_sp006.test
index 590facc3648..0003781f54e 100644
--- a/mysql-test/t/rpl_ndb_sp006.test
+++ b/mysql-test/t/rpl_ndb_sp006.test
@@ -5,5 +5,7 @@
# For different engines #
#################################
-- source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDBCLUSTER;
-- source extra/rpl_tests/rpl_row_sp006.test
diff --git a/mysql-test/t/rpl_ndb_stm_innodb.test b/mysql-test/t/rpl_ndb_stm_innodb.test
index b92fbbcfce6..d772a3372b9 100644
--- a/mysql-test/t/rpl_ndb_stm_innodb.test
+++ b/mysql-test/t/rpl_ndb_stm_innodb.test
@@ -1,7 +1,7 @@
--source include/have_ndb.inc
--source include/have_innodb.inc
--source include/have_binlog_format_mixed_or_statement.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--connection master
create table t1 (a int key, b int) engine innodb;
diff --git a/mysql-test/t/rpl_ndb_sync.test b/mysql-test/t/rpl_ndb_sync.test
index 14e2b36b588..0dbf263dd5a 100644
--- a/mysql-test/t/rpl_ndb_sync.test
+++ b/mysql-test/t/rpl_ndb_sync.test
@@ -2,7 +2,7 @@
--source include/ndb_default_cluster.inc
--source include/not_embedded.inc
--source include/have_binlog_format_row.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
#
# Currently test only works with ndb since it retrieves "old"
diff --git a/mysql-test/t/rpl_ndb_trig004.test b/mysql-test/t/rpl_ndb_trig004.test
index 7439da563a6..f9674e43c50 100644
--- a/mysql-test/t/rpl_ndb_trig004.test
+++ b/mysql-test/t/rpl_ndb_trig004.test
@@ -9,7 +9,7 @@
# Includes
-- source include/have_binlog_format_row.inc
-- source include/have_ndb.inc
--- source include/master-slave.inc
+-- source include/ndb_master-slave.inc
let $engine_type=NDB;
-- source extra/rpl_tests/rpl_trig004.test
diff --git a/mysql-test/t/rpl_ndbapi_multi.test b/mysql-test/t/rpl_ndbapi_multi.test
index 62b83f0557a..c33d0d296ad 100644
--- a/mysql-test/t/rpl_ndbapi_multi.test
+++ b/mysql-test/t/rpl_ndbapi_multi.test
@@ -1,7 +1,7 @@
-- source include/have_ndb.inc
-- source include/have_binlog_format_row.inc
--- source include/master-slave.inc
-- source include/have_ndbapi_examples.inc
+-- source include/ndb_master-slave.inc
--exec echo Running ndbapi_simple_dual
--exec $NDB_EXAMPLES_DIR/ndbapi_simple_dual/ndbapi_simple_dual $MASTER_MYSOCK "localhost:$NDBCLUSTER_PORT" $SLAVE_MYSOCK "localhost:$NDBCLUSTER_PORT_SLAVE" >> $NDB_EXAMPLES_OUTPUT
diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test
index 46d54aea1d2..ec3e6be4bea 100644
--- a/mysql-test/t/rpl_relayrotate.test
+++ b/mysql-test/t/rpl_relayrotate.test
@@ -6,5 +6,6 @@
#######################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/master-slave.inc
let $engine_type=innodb;
-- source extra/rpl_tests/rpl_relayrotate.test
diff --git a/mysql-test/t/rpl_row_001.test b/mysql-test/t/rpl_row_001.test
index 639c55362a5..99eaebcdcaf 100644
--- a/mysql-test/t/rpl_row_001.test
+++ b/mysql-test/t/rpl_row_001.test
@@ -3,5 +3,7 @@
# Added to skip if ndb is default #
########################################################
-- source include/not_ndb_default.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=MYISAM;
-- source extra/rpl_tests/rpl_row_001.test
diff --git a/mysql-test/t/rpl_row_UUID.test b/mysql-test/t/rpl_row_UUID.test
index 6ead7c2ee9b..b0ef96463d0 100644
--- a/mysql-test/t/rpl_row_UUID.test
+++ b/mysql-test/t/rpl_row_UUID.test
@@ -3,5 +3,7 @@
# Added to skip if ndb is default #
########################################################
-- source include/not_ndb_default.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=myisam;
--source extra/rpl_tests/rpl_row_UUID.test
diff --git a/mysql-test/t/rpl_row_basic_2myisam.test b/mysql-test/t/rpl_row_basic_2myisam.test
index c2cef800ec8..c5648fa1d77 100644
--- a/mysql-test/t/rpl_row_basic_2myisam.test
+++ b/mysql-test/t/rpl_row_basic_2myisam.test
@@ -1,3 +1,6 @@
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
+
let $type= 'MYISAM' ;
let $extra_index= ;
-- source extra/rpl_tests/rpl_row_basic.test
diff --git a/mysql-test/t/rpl_row_basic_3innodb.test b/mysql-test/t/rpl_row_basic_3innodb.test
index 89effc4b3bb..3786a697e3f 100644
--- a/mysql-test/t/rpl_row_basic_3innodb.test
+++ b/mysql-test/t/rpl_row_basic_3innodb.test
@@ -1,4 +1,6 @@
-- source include/have_innodb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $type= 'INNODB' ;
let $extra_index= ;
diff --git a/mysql-test/t/rpl_row_basic_7ndb.test b/mysql-test/t/rpl_row_basic_7ndb.test
index 1ec2fb333ae..7cf039a1c21 100644
--- a/mysql-test/t/rpl_row_basic_7ndb.test
+++ b/mysql-test/t/rpl_row_basic_7ndb.test
@@ -1,4 +1,7 @@
-- source include/have_ndb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/ndb_master-slave.inc
+
let $type= 'NDB' ;
let $extra_index= ;
-- source extra/rpl_tests/rpl_row_basic.test
diff --git a/mysql-test/t/rpl_row_blob_innodb.test b/mysql-test/t/rpl_row_blob_innodb.test
index 0bce657f9f9..6aa6c2a31b9 100644
--- a/mysql-test/t/rpl_row_blob_innodb.test
+++ b/mysql-test/t/rpl_row_blob_innodb.test
@@ -7,6 +7,8 @@
########################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=InnoDB;
-- source extra/rpl_tests/rpl_row_blob.test
diff --git a/mysql-test/t/rpl_row_blob_myisam.test b/mysql-test/t/rpl_row_blob_myisam.test
index a470c36f9f8..11f5336502a 100644
--- a/mysql-test/t/rpl_row_blob_myisam.test
+++ b/mysql-test/t/rpl_row_blob_myisam.test
@@ -6,6 +6,8 @@
# Added to skip if ndb is default #
########################################################
-- source include/not_ndb_default.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_row_blob.test
diff --git a/mysql-test/t/rpl_row_charset.test b/mysql-test/t/rpl_row_charset.test
index 9737c52c70f..c83ccc586ba 100644
--- a/mysql-test/t/rpl_row_charset.test
+++ b/mysql-test/t/rpl_row_charset.test
@@ -3,5 +3,7 @@
# Added to skip if ndb is default #
########################################################
-- source include/not_ndb_default.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_row_charset.test
diff --git a/mysql-test/t/rpl_row_func003.test b/mysql-test/t/rpl_row_func003.test
index abfadfe1a1a..30b24cf4174 100644
--- a/mysql-test/t/rpl_row_func003.test
+++ b/mysql-test/t/rpl_row_func003.test
@@ -7,5 +7,7 @@
########################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=INNODB;
-- source extra/rpl_tests/rpl_row_func003.test
diff --git a/mysql-test/t/rpl_row_log.test b/mysql-test/t/rpl_row_log.test
index 3253ae9ecba..197f83c85af 100644
--- a/mysql-test/t/rpl_row_log.test
+++ b/mysql-test/t/rpl_row_log.test
@@ -11,6 +11,7 @@
########################################################
-- source include/not_ndb_default.inc
-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_log.test
diff --git a/mysql-test/t/rpl_row_log_innodb.test b/mysql-test/t/rpl_row_log_innodb.test
index 5e5182e3519..16e775287b3 100644
--- a/mysql-test/t/rpl_row_log_innodb.test
+++ b/mysql-test/t/rpl_row_log_innodb.test
@@ -8,6 +8,7 @@
-- source include/not_ndb_default.inc
-- source include/have_binlog_format_row.inc
-- source include/have_innodb.inc
+-- source include/master-slave.inc
let $engine_type=InnoDB;
-- source extra/rpl_tests/rpl_log.test
diff --git a/mysql-test/t/rpl_row_sp003.test b/mysql-test/t/rpl_row_sp003.test
index 99b30253c8a..391ecd59b22 100644
--- a/mysql-test/t/rpl_row_sp003.test
+++ b/mysql-test/t/rpl_row_sp003.test
@@ -7,5 +7,7 @@
########################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=INNODB;
-- source extra/rpl_tests/rpl_row_sp003.test
diff --git a/mysql-test/t/rpl_row_sp006_InnoDB.test b/mysql-test/t/rpl_row_sp006_InnoDB.test
index f7e59440027..e5be4e6dc28 100644
--- a/mysql-test/t/rpl_row_sp006_InnoDB.test
+++ b/mysql-test/t/rpl_row_sp006_InnoDB.test
@@ -7,5 +7,7 @@
########################################################
-- source include/not_ndb_default.inc
-- source include/have_innodb.inc
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
let $engine_type=InnoDB;
-- source extra/rpl_tests/rpl_row_sp006.test
diff --git a/mysql-test/t/rpl_stm_log.test b/mysql-test/t/rpl_stm_log.test
index 5a1e0facc83..2af9d7f85bc 100644
--- a/mysql-test/t/rpl_stm_log.test
+++ b/mysql-test/t/rpl_stm_log.test
@@ -1,5 +1,6 @@
# Requires statement logging
-- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/master-slave.inc
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_log.test
diff --git a/mysql-test/t/rpl_truncate_7ndb.test b/mysql-test/t/rpl_truncate_7ndb.test
index 1d69eee5dd0..f8933b3744d 100644
--- a/mysql-test/t/rpl_truncate_7ndb.test
+++ b/mysql-test/t/rpl_truncate_7ndb.test
@@ -1,6 +1,6 @@
--source include/have_ndb.inc
---source include/master-slave.inc
+--source include/ndb_master-slave.inc
--source include/have_binlog_format_mixed_or_row.inc
--disable_query_log