mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
A new option --replicate-same-server-id to force a slave to execute queries originating from itself
(WL#794). This can be of interest in some recovery-from-backup scenarios, and also when you have two databases in one mysqld, having a certain similarity and you want one db to be updated when the other is (some sort of trigger). Plus small fix for BUG#3568 "MySQL server crashes when built --with-debug and CHANGE MASTER +MASTER_POS_WAIT" sql/mysqld.cc: new option --replicate-same-server-id sql/slave.cc: new option replicate_same_server_id, to force a slave to execute its own queries. Small fix for BUG#3568 "MySQL server crashes when built --with-debug and CHANGE MASTER +MASTER_POS_WAIT" sql/slave.h: new option --replicate-same-server-id
This commit is contained in:
23
mysql-test/r/rpl_server_id1.result
Normal file
23
mysql-test/r/rpl_server_id1.result
Normal file
@ -0,0 +1,23 @@
|
||||
slave stop;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
slave start;
|
||||
drop table if exists t1;
|
||||
create table t1 (n int);
|
||||
reset master;
|
||||
stop slave;
|
||||
change master to master_port=9307;
|
||||
show slave status;
|
||||
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.001 4 No No 0 0 0 #
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
show status like "slave_running";
|
||||
Variable_name Value
|
||||
Slave_running ON
|
||||
select * from t1;
|
||||
n
|
||||
1
|
||||
drop table t1;
|
Reference in New Issue
Block a user