List:Commits« Previous MessageNext Message »
From:tomas Date:April 12 2006 1:56pm
Subject:bk commit into 5.1 tree (tomas:1.2313)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2313 06/04/12 15:56:29 tomas@stripped +2 -0
  new files

  mysql-test/include/ndb_setup_slave.inc
    1.1 06/04/12 15:56:20 tomas@stripped +27 -0
    New BitKeeper file ``mysql-test/include/ndb_setup_slave.inc''

  mysql-test/include/master-slave-end.inc
    1.1 06/04/12 15:56:20 tomas@stripped +6 -0
    New BitKeeper file ``mysql-test/include/master-slave-end.inc''

  mysql-test/include/ndb_setup_slave.inc
    1.0 06/04/12 15:56:20 tomas@stripped +0 -0
    BitKeeper file /home/tomas/mysql-5.1-new/mysql-test/include/ndb_setup_slave.inc

  mysql-test/include/master-slave-end.inc
    1.0 06/04/12 15:56:20 tomas@stripped +0 -0
    BitKeeper file /home/tomas/mysql-5.1-new/mysql-test/include/master-slave-end.inc

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new
--- New file ---
+++ mysql-test/include/master-slave-end.inc	06/04/12 15:56:20
--connection master
--sync_slave_with_master
--connection slave
--disable_query_log
STOP SLAVE;
--enable_query_log

--- New file ---
+++ mysql-test/include/ndb_setup_slave.inc	06/04/12 15:56:20
#
# 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 ;

Thread
bk commit into 5.1 tree (tomas:1.2313)tomas12 Apr