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

Inserting into collections that begin with system. fails silently

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.3.1
    • None
    • None
    • Fully Compatible
    • ALL

    Description

      There is no indication that the insert failed. getLastError should report that creating collections that start with system. isn't allowed.

      > mongo
      MongoDB shell version: 2.2.0
      connecting to: test
      test[12:8:21]> show collections
      test[12:8:24]> db.system.foobar.insert({a:1})
      Inserted 1 record(s) in 0ms
      test[12:8:30]> db.system.foobar.find()
      Fetched 0 record(s) in 0ms
      test[12:8:42]> show collections
      test[12:8:46]> 

      Attachments

        Activity

          People

            tad Tad Marshall
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: