Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-446

ConnectionString doesn't work with UNIX socket format

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: legacy-1.0.0-rc2
    • Fix Version/s: legacy-1.0.0-rc3
    • Component/s: Implementation
    • Labels:
    • Environment:
      UNIX-based

      Description

      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();

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: