diff options
author | Eliot Horowitz <eliot@10gen.com> | 2013-05-19 23:20:24 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2013-05-19 23:20:24 -0400 |
commit | a6323b8f428e8c7dfcd1efe6645b189c3894f03f (patch) | |
tree | 516f451e3698e714c5d157a43fef3d2525ffd588 | |
parent | 551cb75376b86b059b846f12ad40f0c6bb638c2f (diff) | |
download | mongo-a6323b8f428e8c7dfcd1efe6645b189c3894f03f.tar.gz |
SERVER-6400: inprog has a $all option which isn't valid syntax, so re-write without
-rw-r--r-- | src/mongo/db/instance.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index efd8a7bb877..75c90ad4c2d 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -138,9 +138,22 @@ namespace mongo { bool all = q.query["$all"].trueValue(); vector<BSONObj> vals; { + BSONObj filter; + { + BSONObjBuilder b; + BSONObjIterator i( q.query ); + while ( i.more() ) { + BSONElement e = i.next(); + if ( str::equals( "$all", e.fieldName() ) ) + continue; + b.append( e ); + } + filter = b.obj(); + } + Client& me = cc(); scoped_lock bl(Client::clientsMutex); - scoped_ptr<Matcher> m(new Matcher(q.query)); + scoped_ptr<Matcher> m(new Matcher(filter)); for( set<Client*>::iterator i = Client::clients.begin(); i != Client::clients.end(); i++ ) { Client *c = *i; verify( c ); |