1
# This test checks that a slave DOES execute queries originating
2
# from itself, if running with --replicate-same-server-id.
4
source include/master-slave.inc;
6
create table t1 (n int);
10
--replace_result $SLAVE_MYPORT SLAVE_PORT
11
eval change master to master_port=$SLAVE_MYPORT;
13
insert into t1 values (1);
16
select * from t1; # check that indeed 2 were inserted
17
# We stop the slave before cleaning up otherwise we'll get
18
# 'drop table t1' executed twice, so an error in the slave.err
25
# Bug#38934 slave slave until does not work with --replicate-same-server-id
27
# Verifying that slave performs all events until the master_log_pos
28
# in presense of --replicate-same-server-id the slave is started with.
33
# setting the until position to correspond to the first following create table
34
# which will make the event executed and the slave sql thread stopped
36
let $until_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
39
create table t1(n int);
40
create table t2(n int);
43
--replace_result $MASTER_MYPORT MASTER_PORT
44
eval change master to master_port=$MASTER_MYPORT;
45
--replace_result $until_pos UNTIL_POS
46
eval start slave until master_log_file='master-bin.000001', master_log_pos=$until_pos;
47
--source include/wait_for_slave_io_to_start.inc
48
--source include/wait_for_slave_sql_to_stop.inc
50
--echo *** checking until postion execution: must be only t1 in the list ***
56
start slave sql_thread;
61
sync_slave_with_master;