mariadb/mysql-test/suite/rpl/t/rpl_server_id1.test
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

25 lines
769 B
Text

# 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;
reset master;
# replicate ourselves
stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_port=$SLAVE_MYPORT;
start slave;
--echo *** must be having the replicate-same-server-id IO thread error ***
source include/wait_for_slave_io_to_stop.inc;
--replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 12 # 16 # 19 # 20 # 18 # 37 # 38 #
query_vertical show slave status;
# End of 4.1 tests