diff options
author | David Storch <david.storch@10gen.com> | 2014-01-02 13:32:17 -0500 |
---|---|---|
committer | Matt Kangas <matt.kangas@mongodb.com> | 2014-01-03 16:47:04 -0500 |
commit | c321c9c0b668c8006e3a43971cbf6e0e37778efb (patch) | |
tree | e5bcf8ce1981433f6f8125eecc3a511f7754c4dc /src/mongo/db/query/plan_cache.cpp | |
parent | cd69950fab2cb1f55b87300bfd88218f49500da5 (diff) | |
download | mongo-c321c9c0b668c8006e3a43971cbf6e0e37778efb.tar.gz |
SERVER-10564 cache collection scan query plans
Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Diffstat (limited to 'src/mongo/db/query/plan_cache.cpp')
-rw-r--r-- | src/mongo/db/query/plan_cache.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/query/plan_cache.cpp b/src/mongo/db/query/plan_cache.cpp index aa74f9ac159..f679e50b04c 100644 --- a/src/mongo/db/query/plan_cache.cpp +++ b/src/mongo/db/query/plan_cache.cpp @@ -283,8 +283,12 @@ namespace mongo { SolutionCacheData* SolutionCacheData::clone() const { SolutionCacheData* other = new SolutionCacheData(); - other->tree.reset(this->tree->clone()); - other->wholeIXSoln = this->wholeIXSoln; + if (NULL != this->tree.get()) { + // 'tree' could be NULL if the cached solution + // is a collection scan. + other->tree.reset(this->tree->clone()); + } + other->solnType = this->solnType; other->wholeIXSolnDir = this->wholeIXSolnDir; return other; } |