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

createCollection does not fail on invalid arguments

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical - P2 Critical - P2
    • None
    • 3.0.4
    • JavaScript, Shell
    • None
    • ALL

    Description

      When passing invalid keys and values to the second argument of createCollection it fails to return with an error stating incorrect options have been passed to function. See this example code which returns and

      {"ok": 1}

      response.

      db.createCollection('example',

      {invalidKey: ''invalidValue"}

      )

      Attachments

        Activity

          People

            Unassigned Unassigned
            simon-p-r Simon R
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: