diff options
author | Jason Rassi <rassi@10gen.com> | 2015-01-12 11:15:51 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-01-12 11:25:48 -0500 |
commit | aacb51ba4e1c96de41fc928e58a6341db82076c4 (patch) | |
tree | 29d3173ad6bb8b5a5ae75b124b16c1831545b484 /src/mongo/db/query/find.cpp | |
parent | 4d73df94d51bc86a6a5b30dc3106cd7df6a3b7be (diff) | |
download | mongo-aacb51ba4e1c96de41fc928e58a6341db82076c4.tar.gz |
SERVER-16657 ClientCursor namespace set explicitly on construction
Diffstat (limited to 'src/mongo/db/query/find.cpp')
-rw-r--r-- | src/mongo/db/query/find.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp index b6b73e12454..c3d6575ae2d 100644 --- a/src/mongo/db/query/find.cpp +++ b/src/mongo/db/query/find.cpp @@ -842,7 +842,9 @@ namespace mongo { // Allocate a new ClientCursor. We don't have to worry about leaking it as it's // inserted into a global map by its ctor. - ClientCursor* cc = new ClientCursor(collection->cursorManager(), exec.get(), + ClientCursor* cc = new ClientCursor(collection->cursorManager(), + exec.release(), + nss.ns(), pq.getOptions().toInt(), pq.getFilter()); ccId = cc->cursorid(); @@ -865,9 +867,6 @@ namespace mongo { QLOG() << "caching executor with cursorid " << ccId << " after returning " << numResults << " results" << endl; - // ClientCursor takes ownership of executor. Release to make sure it's not deleted. - exec.release(); - // TODO document if (pq.getOptions().oplogReplay && !slaveReadTill.isNull()) { cc->slaveReadTill(slaveReadTill); |