Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
2.0.2
-
Ubuntu 11.04 x64
Windows Server 2008 R2 x64
-
ALL
Description
We can create capped collection with negative size. And we can create such collection multiple times. After that we can't drop it.
MongoDB shell version: 2.0.2
|
connecting to: test
|
> use testdb
|
switched to db testdb
|
> db.dropDatabase()
|
{ "dropped" : "testdb", "ok" : 1 }
|
> db.getCollectionNames()
|
[ ]
|
> db.createCollection("tmp1", {capped: true, size: -1})
|
{
|
"errmsg" : "exception: create collection invalid size spec",
|
"code" : 10083,
|
"ok" : 0
|
}
|
> db.getCollectionNames()
|
[ "tmp1" ]
|
> db.createCollection("tmp1", {capped: true, size: -1})
|
{
|
"errmsg" : "exception: create collection invalid size spec",
|
"code" : 10083,
|
"ok" : 0
|
}
|
> db.getCollectionNames()
|
[ "tmp1", "tmp1" ]
|
> db.createCollection("tmp1", {capped: true, size: -1})
|
{
|
"errmsg" : "exception: create collection invalid size spec",
|
"code" : 10083,
|
"ok" : 0
|
}
|
> db.getCollectionNames()
|
[ "tmp1", "tmp1", "tmp1" ]
|
> db.tmp1.drop()
|
false
|
> db.getCollectionNames()
|
[ "tmp1", "tmp1", "tmp1" ]
|