diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2006-04-13 10:48:24 +0200 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2006-04-13 10:48:24 +0200 |
commit | 4b277da5a26ec2ebe2126d8b27eb2a43e29c93c1 (patch) | |
tree | e1364c40403bc995dcbef0062bd3c07f2147b292 /mysql-test/include | |
parent | dfaea5c81f1fc4c426d2219ed447c76072b00be5 (diff) | |
parent | ce464a3dce70871e611064c3c1dc30df0c5a1c8a (diff) | |
download | mariadb-git-4b277da5a26ec2ebe2126d8b27eb2a43e29c93c1.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new
client/mysqltest.c:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
mysql-test/t/disabled.def:
manual merge
Diffstat (limited to 'mysql-test/include')
-rw-r--r-- | mysql-test/include/master-slave-end.inc | 6 | ||||
-rw-r--r-- | mysql-test/include/ndb_setup_slave.inc | 27 |
2 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/include/master-slave-end.inc b/mysql-test/include/master-slave-end.inc new file mode 100644 index 00000000000..74e4c7b608a --- /dev/null +++ b/mysql-test/include/master-slave-end.inc @@ -0,0 +1,6 @@ +--connection master +--sync_slave_with_master +--connection slave +--disable_query_log +STOP SLAVE; +--enable_query_log diff --git a/mysql-test/include/ndb_setup_slave.inc b/mysql-test/include/ndb_setup_slave.inc new file mode 100644 index 00000000000..b1efeded90b --- /dev/null +++ b/mysql-test/include/ndb_setup_slave.inc @@ -0,0 +1,27 @@ +# +# now setup replication to continue from last epoch +# 1. get apply_status epoch from slave +# 2. get corresponding _next_ binlog postition from master +# 3. change master on slave + +# 1. +--connection slave +--replace_column 1 <the_epoch> +SELECT @the_epoch:=MAX(epoch) FROM cluster.apply_status; +--let $the_epoch= `select @the_epoch` + +# 2. +--connection master +--replace_result $the_epoch <the_epoch> +--replace_column 1 <the_pos> +eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) + FROM cluster.binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1; +--let $the_pos= `SELECT @the_pos` +--let $the_file= `SELECT @the_file` + +# 3. +--connection slave +--replace_result $the_pos <the_pos> +eval CHANGE MASTER TO + master_log_file = '$the_file', + master_log_pos = $the_pos ; |