[SERVER-7381] Inserting into collections that begin with system. fails silently Created: 17/Oct/12  Updated: 11/Jul/16  Resolved: 23/Oct/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3.1

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 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]> 



 Comments   
Comment by auto [ 23/Oct/12 ]

Author:

{u'date': u'2012-10-17T10:53:39-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-7381 use User Assert for disallowed user operation

Follow the advice in the "todo" in the code and use a uassert instead
of logging a message (which the user will never see).
Branch: master
https://github.com/mongodb/mongo/commit/85d1e784d2d0f45df6a5f2fc610500614343cad6

Comment by auto [ 23/Oct/12 ]

Author:

{u'date': u'2012-10-17T10:53:39-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-7381 use User Assert for disallowed user operation

Follow the advice in the "todo" in the code and use a uassert instead
of logging a message (which the user will never see).
Branch: master
https://github.com/mongodb/mongo/commit/85d1e784d2d0f45df6a5f2fc610500614343cad6

Comment by auto [ 23/Oct/12 ]

Author:

{u'date': u'2012-10-17T10:53:39-07:00', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-7381 use User Assert for disallowed user operation

Follow the advice in the "todo" in the code and use a uassert instead
of logging a message (which the user will never see).
Branch: master
https://github.com/mongodb/mongo/commit/85d1e784d2d0f45df6a5f2fc610500614343cad6

Generated at Thu Feb 08 03:14:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.