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

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

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0.0
    • Fix Version/s: Backlog
    • Component/s: Catalog
    • Labels:
      None

      Description

      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"
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-execution Backlog - Storage Execution Team
              Reporter:
              stennie Stennie Steneker
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: