Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-636

Multiple database names ignored without a warning

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.1.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      There's no checking if multiple database names are provided, I'm just starting with mongoDB with node.js and I fall for that one because of a typo that produced this URL:
      mongodb://127.0.0.1/27017/test

      The driver worked with no complains but returned nothing for my query because it created and worked on a new database named '27017' instead of database 'test

      I checked already and that should URL should be violate the format:

      mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

      So I guess an error should been thrown there, the fix is trivial and ready just waiting for confirmation.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            yousefhamza Yousef Mohamed Hamza
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: