Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4549

Size limits on database names should be in terms of bytes, not characters

    XMLWordPrintableJSON

Details

    Description

      http://docs.mongodb.org/manual/reference/limits/ states:

      Length of Database Names
      Database names cannot be empty and must have fewer than 64 characters.

      However, this limit appears to be based on the number of bytes in the name, as the shell will reject shorter names which use multibyte unicode characters. For example:

      > use 処処処処処処処処処処処処処処処処処処処処処
      switched to db 処処処処処処処処処処処処処処処処処処処処処
      > use 処処処処処処処処処処処処処処処処処処処処処処
      2014-12-17T14:06:19.955-0500 I QUERY Error: [処処処処処処処処処処処処処処処処処処処処処処] is not a valid database name
      at Mongo.getDB (src/mongo/shell/mongo.js:41:12)
      at shellHelper.use (src/mongo/shell/utils.js:537:24)
      at shellHelper (src/mongo/shell/utils.js:524:36)
      at (shellhelp2):1:1 at src/mongo/shell/mongo.js:41
      >

      Attachments

        Activity

          People

            andrew.aldridge@mongodb.com Andrew Aldridge
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks, 1 day ago