mariadb/mysql-test/suite/rpl/r/rpl_server_id1.result
unknown e19c8e2ebf Bug #31316 Report server id clashes in SHOW SLAVE STATUS
"Server_IO_State" field

Critical error messages from get_master_version_and_clock() were written
only to the slave errorlog while Show slave status did not display any
incident happened.

Although the artifact was reported for a particular --replicate-same-server-id
related issue the fix refines all critical error reporting with 
deploying rli->report().

The test for the bug covers only --replicate-same-server-id error reporting.


mysql-test/suite/rpl/r/rpl_server_id1.result:
  new results reflecting changes
mysql-test/suite/rpl/t/rpl_server_id1.test:
  Preserving the idea of the test unnecessary queries and the sleep are
  eliminated.
  In the end the slave must stop with the error displayable via $$$.
sql/slave.cc:
  improving get_master_version_and_clock() code to report a critical incident
  via rli->report() that takes care of bothe the error log and
  the slave's status info placeholders.
  
  A critical error that force the IO slave thread to terminate is handled
  immediately (goto err).
2008-02-20 23:18:01 +02:00

50 lines
1.3 KiB
Text

stop slave;
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;
start slave;
reset master;
stop slave;
change master to master_port=SLAVE_PORT;
start slave;
*** must be having the replicate-same-server-id IO thread error ***
show slave status;
Slave_IO_State
Master_Host 127.0.0.1
Master_User root
Master_Port SLAVE_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Relay_Log_File slave-relay-bin.000001
Relay_Log_Pos 4
Relay_Master_Log_File
Slave_IO_Running No
Slave_SQL_Running #
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table #
Last_Errno #
Last_Error #
Skip_Counter 0
Exec_Master_Log_Pos 0
Relay_Log_Space 106
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master NULL
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 1593
Last_IO_Error Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
Last_SQL_Errno #
Last_SQL_Error #