From 59e22375e4a63da6281b4ace7bebcd5b33a93b39 Mon Sep 17 00:00:00 2001 From: Andrew Aldridge Date: Fri, 10 Oct 2014 17:03:56 -0400 Subject: [PATCH] DOCS-4137: Document dropDatabase() change --- source/core/authentication.txt | 2 ++ source/includes/fact-drop-database-users.rst | 7 +++++++ source/reference/command/dropDatabase.txt | 22 ++++++++++---------- source/reference/method/db.dropDatabase.txt | 4 ++++ 4 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 source/includes/fact-drop-database-users.rst diff --git a/source/core/authentication.txt b/source/core/authentication.txt index 42b1be8b15c..f6ae617fda6 100644 --- a/source/core/authentication.txt +++ b/source/core/authentication.txt @@ -28,6 +28,8 @@ their membership ` to their respective replica set or sharded cluster. See :ref:`inter-process-auth` for more information. +.. _authentication-client-users: + Client Users ------------ diff --git a/source/includes/fact-drop-database-users.rst b/source/includes/fact-drop-database-users.rst new file mode 100644 index 00000000000..b49e6890282 --- /dev/null +++ b/source/includes/fact-drop-database-users.rst @@ -0,0 +1,7 @@ +.. versionchanged:: 2.6 + + This command does not delete the + :ref:`users ` associated with the current + database. To drop the associated users, run the + :dbcommand:`dropAllUsersFromDatabase` command in the database you are + deleting. diff --git a/source/reference/command/dropDatabase.txt b/source/reference/command/dropDatabase.txt index 404c23b7563..ed6991836c4 100644 --- a/source/reference/command/dropDatabase.txt +++ b/source/reference/command/dropDatabase.txt @@ -6,24 +6,24 @@ dropDatabase .. dbcommand:: dropDatabase - The :dbcommand:`dropDatabase` command drops a database, deleting - the associated data files. :dbcommand:`dropDatabase` operates on the - current database. + The :dbcommand:`dropDatabase` command drops the current database, deleting + the associated data files. - In the shell issue the ``use `` - command, replacing ```` with the name of the database - you wish to delete. Then use the following command form: + .. include:: /includes/fact-drop-database-users.rst + + To run this command, issue the ``use `` command in the shell, + replacing ```` with the name of the database you wish to delete. + Then use the following command form: .. code-block:: javascript { dropDatabase: 1 } - The :program:`mongo` shell also provides the following equivalent helper method: - - .. code-block:: javascript - - db.dropDatabase(); + The :program:`mongo` shell also provides the following equivalent helper method + :method:`db.dropDatabase()`. .. include:: /includes/warning-blocking-global.rst .. write-lock + +.. seealso:: :dbcommand:`dropAllUsersFromDatabase` diff --git a/source/reference/method/db.dropDatabase.txt b/source/reference/method/db.dropDatabase.txt index d10f59c6230..fb86a7e0b37 100644 --- a/source/reference/method/db.dropDatabase.txt +++ b/source/reference/method/db.dropDatabase.txt @@ -9,3 +9,7 @@ db.dropDatabase() Removes the current database. Does not change the current database, so the insertion of any documents in this database will allocate a fresh set of data files. + + .. include:: /includes/fact-drop-database-users.rst + +.. seealso:: :dbcommand:`dropDatabase`