Bug #1761 mysql should give an error if 2 machines have the same server-id
Submitted: 5 Nov 2003 17:26 Modified: 7 Jun 2004 11:15
Reporter: Dan Edwards Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S4 (Feature request)
Version:4.0.16 OS:Linux (redhat 9)
Assigned to: Guilhem Bichot CPU Architecture:Any

[5 Nov 2003 17:26] Dan Edwards
Description:
Trying to restore a slave server from backups I forgot to change the server-id and everything appeared to be working ok according to show slave status. But no tables were being updated. After a few hours of banging my head I realized the server-id of the slave and master were the same. An error message in show slave status would have saved me lots of time.

How to repeat:
set server-id of master and slave to the same number.
Fire up slave and watch the Read_Master_Log_Pos and Relay_Log_Pos increment away like nothings wrong, but no new data showing up in tables.

Suggested fix:
have slave fail to start if ids match and give an error message in show slave status;
[6 Nov 2003 6:33] Guilhem Bichot
Hi,

I put it in discussion internally.

Regards,
Guilhem
[7 Jun 2004 11:15] Guilhem Bichot
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Hi,

starting from 4.1.3, the replication slave will print a warning message to its error log if server ids are equal.
(done in ChangeSet@1.1843.14.1, 2004-06-03 23:17:18+02:00, guilhem@mysql.com)

Guilhem