Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-2163

Mongo shell lets you switch to a database named ""

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.4
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows
    • ALL

      The shell will let you set the current database to "". Illustration below:

      > use
      switched to db
      > db

      > show collections
      Tue Nov 30 17:33:48 uncaught exception: error:

      { "$err" : "db name can't be empty", "code" : 13075 }

      The use command without a parameter should display an error and not change the current database.

            Assignee:
            dwight@mongodb.com Dwight Merriman
            Reporter:
            zippy1981 Justin Dearing
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: