diff options
author | Jason Rassi <rassi@10gen.com> | 2013-12-17 16:57:56 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2013-12-17 16:57:56 -0500 |
commit | 135a586d4954eac2ddf0e3f6f5b047177acce667 (patch) | |
tree | 81016b0840097a255c2aeff85af486ba042c7315 /src | |
parent | b44edc42e42524d2f8bf66d389eeb6d973fbf40e (diff) | |
download | mongo-135a586d4954eac2ddf0e3f6f5b047177acce667.tar.gz |
SERVER-12124 SERVER-10026 EOFRunner properly explain null collscan
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/query/eof_runner.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/query/eof_runner.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/query/eof_runner.cpp b/src/mongo/db/query/eof_runner.cpp index d4edf0138c7..c26564c168f 100644 --- a/src/mongo/db/query/eof_runner.cpp +++ b/src/mongo/db/query/eof_runner.cpp @@ -73,6 +73,11 @@ namespace mongo { Status EOFRunner::getExplainPlan(TypeExplain** explain) const { *explain = new TypeExplain; + // Fill in mandatory fields. + (*explain)->setN(0); + (*explain)->setNScannedObjects(0); + (*explain)->setNScanned(0); + // Fill in all the main fields that don't have a default in the explain data structure. (*explain)->setCursor("BasicCursor"); (*explain)->setScanAndOrder(false); @@ -85,6 +90,9 @@ namespace mongo { allPlans->setCursor("BasicCursor"); (*explain)->addToAllPlans(allPlans); // ownership xfer + (*explain)->setNScannedObjectsAllPlans(0); + (*explain)->setNScannedAllPlans(0); + return Status::OK(); } diff --git a/src/mongo/db/query/eof_runner.h b/src/mongo/db/query/eof_runner.h index de33c1c2b03..bffeb4f59a8 100644 --- a/src/mongo/db/query/eof_runner.h +++ b/src/mongo/db/query/eof_runner.h @@ -48,7 +48,7 @@ namespace mongo { class EOFRunner : public Runner { public: - /* Takes onwership */ + /* Takes ownership */ EOFRunner(CanonicalQuery* cq, const std::string& ns); virtual ~EOFRunner(); |