0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

$explain should honor limit()

This commit is contained in:
Dwight 2008-11-17 17:03:17 -05:00
parent 261d46c2f2
commit 805b9b23ad

View File

@ -690,6 +690,8 @@ QueryResult* runQuery(Message& message, const char *ns, int ntoskip, int _ntoret
} else {
if( explain ) {
n++;
if( n >= ntoreturn && !wantMore )
break; // .limit() was used, show just that much.
}
else {
bool ok = fillQueryResultFromObj(b, filter.get(), js);