Uploaded image for project: 'MongoDB ETL Tools'
  1. MongoDB ETL Tools
  2. TOOLS-2019

Tools should ignore case for database names



    • Type: Improvement
    • Status: Accepted
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: 3.6.4
    • Fix Version/s: None
    • Component/s: All Tools, mongodump
    • Labels:


      Although database names are case insensitive on the server side, there are some behaviors that cause problems as we are not always case insensitive.

      For example, specifying a database name in the wrong case to mongodump will not dump the database. For example:

      $ mongodump --db XYZ
      $ mongodump --db xyz
      2018-04-24T12:11:10.999-0400    writing xyz.xx to
      2018-04-24T12:11:11.001-0400    done dumping xyz.xx (1 document)

      In the example above, mongodump silently ignores the database when presented with the wrong case sensitive name.

      A similar inconsistency can be seen using the MongoDB Shell. For example:

      $ mongo mongodb://localhost/xyz
      MongoDB shell version v3.6.3
      connecting to: mongodb://localhost/xyz
      MongoDB server version: 3.6.3
      replset:PRIMARY> db.xx.insert({a:1})
      Inserted 1 record(s) in 78ms
        "nInserted": 1
      replset:PRIMARY> exit
      $ mongo mongodb://localhost/XYZ
      replset:PRIMARY> show collections
      replset:PRIMARY> db.xx.insert({a:1})
      	"nInserted" : 0,
      	"writeError" : {
      		"code" : 13297,
      		"errmsg" : "db already exists with different case already have: [xyz] trying to create [XYZ]"

      In the example above, the user is able to connect to the XYZ database. Show collections does not show any collections but an attempt to insert data raises the exception that the database already exists using different case sensitivity.

      These problems presumably manifest in other commands as well and this ticket is a request to improve our handling of case insensitivity.




            • Assignee:
              backlog-server-tools Backlog - Server Tools Team
              arnie.listhaus Arnie Listhaus
            • Votes:
              1 Vote for this issue
              3 Start watching this issue


              • Created: