Bug #53767 duplicate server-id isn't parsed as expected
Submitted: 18 May 2010 22:43 Modified: 19 May 2010 4:53
Reporter: Joachim Astel Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Parser Severity:S3 (Non-critical)
Version:5.0.67 OS:Any
Assigned to: CPU Architecture:Any

[18 May 2010 22:43] Joachim Astel
I've noticed a problem with the server-id command within my.cnf:

server-id = 1
server-id = 2

results into:

server-id = 2

instead of making a "duplicate server-id configuration" error or warning.


How to repeat:
Use a my.cnf with the following lines:

server-id = 1
server-id = 2
[19 May 2010 3:54] Valeriy Kravchuk
This is not a bug, but intended and documented behavior. Read http://dev.mysql.com/doc/refman/5.0/en/option-files.html:

"If multiple instances of a given option are found, the last instance takes precedence. There is one exception: For mysqld, the first  instance of the --user option is used as a security precaution, to prevent a user specified in an option file from being overridden on the command line."
[19 May 2010 4:53] Joachim Astel
... Then understand it as a feature request.

My problem with this parser is:

person 1 has a ready-to-go my.cnf configuration, which is already
         containing a "server-id = 2" line, and gives it to person 2.
person 2 as a mysql beginner, reads a online tutorial, refers by his
         standard examples, inserts a "server-id = 1" line, and
         wonders for hours why the functionality - configuration
         with "server-id 1" doesn't work at all.

That's no good behaviour of a parser i think.