# This test checks that the slave I/O thread refuses to start if slave # and master have the same server id (because this is a useless setup, # and otherwise SHOW SLAVE STATUS shows progress but all queries are # ignored, which has caught our customers), unless # --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; --vertical_results #--replace_result $SLAVE_MYPORT SLAVE_PORT #--replace_column 16 # 18 # #show slave status; #checking show slave status let $status_items= Slave_IO_State,Master_Host,Master_User,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,Replicate_Do_Table,Replicate_Wild_Do_Table,Last_Errno,Last_Error,Skip_Counter,Exec_Master_Log_Pos,Relay_Log_Space,Until_Condition,Until_Log_File,Until_Log_Pos,Master_SSL_Allowed,Master_SSL_CA_File,Master_SSL_CA_Path,Master_SSL_Cert,Master_SSL_Cipher,Master_SSL_Key,Seconds_Behind_Master,Master_SSL_Verify_Server_Cert,Last_IO_Errno,Last_IO_Error,Last_SQL_Errno,Last_SQL_Error,Replicate_Ignore_Server_Ids,Master_Server_Id; source include/show_slave_status.inc; start slave; insert into t1 values (1); # can't MASTER_POS_WAIT(), it does not work in this weird setup # (when slave is its own master without --replicate-same-server-id) sleep 2; # enough time for the event to be replicated (it should not) show status like "slave_running"; drop table t1; # End of 4.1 tests