mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	by adding sleep-and-retries (max 4 times) if MASTER_POS_WAIT() returns NULL in sync_with_master and sync_slave_with_master. The problem showed up only today, in MySQL 5.0 in rpl_server_id2.test, but may affect 4.x as well, so fixing it here. Note that I am also fixing 5.0 too, with the same exact patch, because I don't want to leave 5.0 broken until the next 4.0->4.1->5.0 merge.
		
			
				
	
	
		
			25 lines
		
	
	
		
			719 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			719 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# This test checks that a slave DOES execute queries originating
 | 
						|
# from itself, if running with --replicate-same-server-id.
 | 
						|
 | 
						|
source include/master-slave.inc;
 | 
						|
connection slave;
 | 
						|
create table t1 (n int);
 | 
						|
reset master;
 | 
						|
# replicate ourselves
 | 
						|
stop slave;
 | 
						|
--replace_result $SLAVE_MYPORT SLAVE_PORT
 | 
						|
eval change master to master_port=$SLAVE_MYPORT;
 | 
						|
--replace_result $SLAVE_MYPORT SLAVE_PORT
 | 
						|
--replace_column 18 #
 | 
						|
show slave status;
 | 
						|
start slave;
 | 
						|
insert into t1 values (1);
 | 
						|
save_master_pos;
 | 
						|
sync_with_master;
 | 
						|
select * from t1; # check that indeed 2 were inserted
 | 
						|
# We stop the slave before cleaning up otherwise we'll get
 | 
						|
# 'drop table t1' executed twice, so an error in the slave.err
 | 
						|
# (not critical).
 | 
						|
stop slave;
 | 
						|
drop table t1;
 |