diff options
-rw-r--r-- | s/strategy_single.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/s/strategy_single.cpp b/s/strategy_single.cpp index 0f53bbd69c4..71c18ce7f35 100644 --- a/s/strategy_single.cpp +++ b/s/strategy_single.cpp @@ -14,10 +14,10 @@ namespace mongo { bool lateAssert = false; - log(3) << "single query: " << q.ns << " " << q.query << endl; - + log(3) << "single query: " << q.ns << " " << q.query << " ntoreturn: " << q.ntoreturn << endl; + try { - if ( q.ntoreturn == 1 && strstr(q.ns, ".$cmd") ) { + if ( ( q.ntoreturn == -1 || q.ntoreturn == 1 ) && strstr(q.ns, ".$cmd") ) { BSONObjBuilder builder; bool ok = runCommandAgainstRegistered(q.ns, q.query, builder); if ( ok ) { |