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

Input validation on the arguments to createCollection

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 2.8.0-rc0
    • Fix Version/s: None
    • Component/s: Storage, Usability
    • Labels:
      None
    • Operating System:
      ALL

      Description

      Arguments to createCollection need better validation:

      • Start mongod with the WT storage engine

        $ rm -rf db && mkdir db && mongod --dbpath db  --storageEngine wiredtiger

      • Create a collection

        > db.createCollection("foo", {storageEngine: {wiredTiger: {configString: "foo=bar"}}})
        { "ok" : 1 }

      The casing of the storage engine is incorrect, it should be wiredtiger (no uppercase T), but the options are ignored without errors in the shell or the logs. For that matter the following also works:

      > db.createCollection("foo", {storageEngine: {x: {y : "z"}}})
      { "ok" : 1 }

      This is bound to cause come confusion among users.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              benety.goh Benety Goh
              Reporter:
              ramon.fernandez Ramon Fernandez Marina
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: