Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Minor Change
-
ALL
Description
if calling createIndex on already existing index, but with different options (like unique), no error is raised but index is not changed
At the end of following, the index is not unique:
foo:PRIMARY> db.test2.createIndex({c:1})
|
foo:PRIMARY> db.test2.createIndex({c:1}, {unique: true})
|
foo:PRIMARY> db.system.indexes.find()
|
{ "_id" : ObjectId("4d65b40cb91238df65f3e841"), "ns" : "mydb.test2", "key" : { "c" : 1 }, "name" : "c_1", "v" : 0 }
|
Attachments
Issue Links
- is duplicated by
-
SERVER-2699 ensureIndex() fails to create unique index if non-unique index already exists
-
- Closed
-