2 # now setup replication to continue from last epoch
3 # 1. get ndb_apply_status epoch from slave
4 # 2. get corresponding _next_ binlog postition from master
5 # 3. change master on slave
10 --replace_column 1 <the_epoch>
11 SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
12 --let $the_epoch= `select @the_epoch`
16 --replace_result $the_epoch <the_epoch>
17 --replace_column 1 <the_pos>
19 eval SELECT @the_pos:=Position,
20 @the_file:=SUBSTRING_INDEX(
REPLACE(FILE,
'\\\\',
'/'),
'/', -1)
21 FROM mysql.ndb_binlog_index WHERE epoch > $the_epoch
ORDER BY epoch ASC LIMIT 1;
23 --let $the_pos= `SELECT @the_pos`
24 --let $the_file= `SELECT @the_file`
28 --replace_result $the_pos <the_pos>
30 master_log_file =
'$the_file',
31 master_log_pos = $the_pos ;