diff options
author | Maria van Keulen <maria@mongodb.com> | 2017-04-25 09:44:44 -0400 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2017-04-28 14:57:37 -0400 |
commit | 9fb79929f9e957ba62c41d2114ef5a78dc4965b5 (patch) | |
tree | 73fb5936fe9940cfd444a2342399ae4c8ee07123 /src/mongo/db/query/query_request.cpp | |
parent | 5c702fedb3216b1a327d3791cd9e995fefc4ab2f (diff) | |
download | mongo-9fb79929f9e957ba62c41d2114ef5a78dc4965b5.tar.gz |
SERVER-27991 Allow find and listIndexes to accept UUID argument
This patch allows callers of the find and listIndexes commands to
pass either a UUID or a collection name as the collection identifier
argument.
Diffstat (limited to 'src/mongo/db/query/query_request.cpp')
-rw-r--r-- | src/mongo/db/query/query_request.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/query/query_request.cpp b/src/mongo/db/query/query_request.cpp index 0b6d6e4c5c4..2bf9f12a15c 100644 --- a/src/mongo/db/query/query_request.cpp +++ b/src/mongo/db/query/query_request.cpp @@ -124,8 +124,12 @@ StatusWith<unique_ptr<QueryRequest>> QueryRequest::makeFromFindCommand(Namespace BSONElement el = it.next(); const auto fieldName = el.fieldNameStringData(); if (fieldName == kFindCommandName) { + // Check both String and UUID types for "find" field. Status status = checkFieldType(el, String); if (!status.isOK()) { + status = checkFieldType(el, BinData); + } + if (!status.isOK()) { return status; } } else if (fieldName == kFilterField) { |