-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.1.3
-
Component/s: Internal Code
-
Fully Compatible
-
ALL
The behavior in 3.0 was to only include the "dropped" field in the response only if the database actually existed. This was changed as part of 1725d76. However, the behavior prior to 3.0 was to always include the "dropped" field, regardless of whether the database existed before the command was executed.
> db.version() 3.1.2 > db.foo.insert({}) WriteResult({ "nInserted" : 1 }) > db.dropDatabase() { "dropped" : "test", "ok" : 1 } > db.dropDatabase() { "dropped" : "test", "ok" : 1 }
> db.version() 3.1.1 > db.foo.insert({}) WriteResult({ "nInserted" : 1 }) > db.dropDatabase() { "dropped" : "test", "ok" : 1 } > db.dropDatabase() { "ok" : 1 }
> db.version() 3.0.3 > db.foo.insert({}) WriteResult({ "nInserted" : 1 }) > db.dropDatabase() { "dropped" : "test", "ok" : 1 } > db.dropDatabase() { "ok" : 1 }
> db.version() 2.6.10 > db.foo.insert({}) WriteResult({ "nInserted" : 1 }) > db.dropDatabase() { "dropped" : "test", "ok" : 1 } > db.dropDatabase() { "dropped" : "test", "ok" : 1 }
> db.version() 2.4.14 > db.foo.insert({}) > db.dropDatabase() { "dropped" : "test", "ok" : 1 } > db.dropDatabase() { "dropped" : "test", "ok" : 1 }