[SERVER-18825] dropDatabase command provides no indication of whether database existed Created: 04/Jun/15  Updated: 19/Sep/15  Resolved: 05/Jun/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 3.1.3
Fix Version/s: 3.1.4

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: Fit&Finish
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

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 }



 Comments   
Comment by Githook User [ 05/Jun/15 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-18825 restore indicator behavior of "dropped" field in a dropDatabase command response
Branch: master
https://github.com/mongodb/mongo/commit/679609b12b29dfe9d3827c089e5ef76c5db091b9

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