summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2016-11-18 17:04:42 -0500
committerGeert Bosch <geert@mongodb.com>2016-11-18 17:04:42 -0500
commit33869b6b9a2155fad7f53531f85f2ce79b46a489 (patch)
treed418088fa94c94175cb08175eb7665a39312af4c /src/mongo/db/commands
parent512f655b5b4d3fd713a035633b6e857e85db8e7b (diff)
downloadmongo-33869b6b9a2155fad7f53531f85f2ce79b46a489.tar.gz
Revert "SERVER-23976: Input validate repair database for casing"
This reverts commit 512f655b5b4d3fd713a035633b6e857e85db8e7b.
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/dbcommands.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp
index be2c49cadc7..cf253a902f2 100644
--- a/src/mongo/db/commands/dbcommands.cpp
+++ b/src/mongo/db/commands/dbcommands.cpp
@@ -261,23 +261,9 @@ public:
return false;
}
- // Closing a database requires a global lock.
+ // TODO: SERVER-4328 Don't lock globally
ScopedTransaction transaction(txn, MODE_X);
Lock::GlobalWrite lk(txn->lockState());
- if (!dbHolder().get(txn, dbname)) {
- // If the name doesn't make an exact match, check for a case insensitive match.
- std::string otherCasing = Database::duplicateUncasedName(dbname, nullptr);
- if (otherCasing == nullptr) {
- // Database doesn't exist. Treat this as a success (historical behavior).
- return true;
- }
-
- // Database exists with a differing case. Treat this as an error. Report the casing
- // conflict.
- errmsg = str::stream() << "Database exists with a different case. Given: `" << dbname
- << "` Found: `" << otherCasing << "`";
- return false;
- }
// TODO (Kal): OldClientContext legacy, needs to be removed
{