diff options
author | Sam Kleinman <samk@10gen.com> | 2015-03-30 19:04:57 -0400 |
---|---|---|
committer | Ramon Fernandez <ramon.fernandez@mongodb.com> | 2015-04-17 11:28:05 -0400 |
commit | 150d03405122fbb7ffe20a0d99d12199fa3bcb42 (patch) | |
tree | fb4130e52cd6e310da79a4c85d2176c3f85c63b9 | |
parent | 003520d8d6190beedb7a7a2a1d2b77ef7a974adf (diff) | |
download | mongo-150d03405122fbb7ffe20a0d99d12199fa3bcb42.tar.gz |
SERVER-17749: ignore fields starting with $ in collMod command, to match behavior of aggregation pipeline command.
(cherry picked from commit aa51ce621c39c54c2105eebe2f0961f0dc9c2890)
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index c64e55c43e5..9d5b9d027c5 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -1135,6 +1135,9 @@ namespace mongo { if ( str::equals( "collMod", e.fieldName() ) ) { // no-op } + else if ( str::startsWith( e.fieldName(), "$" ) ) { + // no-op: ignore top-level fields prefixed with $. They are for the command processor. + } else if ( LiteParsedQuery::cmdOptionMaxTimeMS == e.fieldNameStringData() ) { // no-op } |