-
Type: Improvement
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: legacy-1.0.0-rc2
-
Component/s: Implementation
-
Environment:UNIX-based
mongodb:///tmp/mongodb-27017.sock
This should be a valid string, instead an assert is fired in the constructor of the ConnectionString here:
ConnectionString( ConnectionType type, const std::string& user, const std::string& password, const std::string& servers, const std::string& database, const std::string& setName, const BSONObj& options ) : _type( type ) , _servers( ) , _setName( setName ) , _user( user ) , _password( password ) , _database( database ) , _options( options ) { _fillServers( servers ); switch ( _type ) { case MASTER: verify( _servers.size() == 1 ); break; case SET: verify( _setName.size() ); // ->HERE verify( _servers.size() >= 1 ); // 1 is ok since we can derive break; case PAIR: verify( _servers.size() == 2 ); break; default: verify( _servers.size() > 0 ); } _finishInit();