Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-58864

dropDatabase should return some detail on whether a db was actually dropped

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 5.0.0
    • Component/s: Catalog
    • None
    • Execution Team 2021-12-27, Execution Team 2022-01-10, Execution Team 2022-01-24, Execution Team 2022-02-07, Execution Team 2022-03-07, Execution Team 2022-04-18, Execution Team 2022-05-30

      The dropDatabase command returns

      { "ok" : 1}

      even when dropping a database that does not exist.

      Changing the ok result would be a significant breaking change, but it would be helpful to return some detail to confirm whether the command succeeded AND a database was dropped.

      The drop command returns an errmsg when attempting to drop a non-existent collection:

      > db.runCommand({'drop': 'foo'})
      {
      	"ok" : 0,
      	"errmsg" : "ns not found",
      	"code" : 26,
      	"codeName" : "NamespaceNotFound"
      }
      

            Assignee:
            matt.kneiser@mongodb.com Matt Kneiser
            Reporter:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: