[CSHARP-119] Connection string does not support , as a delimiter as specified in doc Created: 01/Dec/10  Updated: 02/Apr/15  Resolved: 01/Dec/10

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 0.7
Fix Version/s: 0.7

Type: Bug Priority: Minor - P4
Reporter: J W Lee Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

N/A


Backwards Compatibility: Fully Compatible

 Description   

According to http://www.mongodb.org/display/DOCS/Connections the delimiter for connection string options is comma although there is a caveat on the page that states that not all drivers support the syntax yet.
This may be confusing to devs using the .dll only as you need to dig into the source code to find the supported delimiter.

Currently supports:
mongodb://host1,host2,host3/?connect=direct;slaveok=true

Should support as well:
mongodb://host1,host2,host3/?connect=direct,slaveok=true



 Comments   
Comment by Robert Stam [ 01/Dec/10 ]

OK. I didn't catch that the examples were wrong. I can fix that right now.

Comment by J W Lee [ 01/Dec/10 ]

Hmmm, you are correct, I've re-read the syntax and it does mention ; and &. I was actually reading the examples further down the page that is incorrect. I will post a bug in the other project then.

Under examples further down the page:
Connect to the first server to respond, whether or not it is part of a replica set or primary or secondary:

mongodb://host1,host2,host3/?connect=direct,slaveok=true

Comment by Robert Stam [ 01/Dec/10 ]

The options can only be separated by "&" or ";" (ampersand or semicolon). Commas are only used to separate host names.

I checked the documentation page and I think it is correct. It does not say that a comma is allowed between options.

Generated at Wed Feb 07 21:35:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.