diff options
author | Qingyang Chen <qingyang.chen@10gen.com> | 2015-06-05 16:10:06 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-06-16 18:41:49 -0400 |
commit | 2b4474715604697acacca70c7f7647947b2c82f1 (patch) | |
tree | 6176ac301782aaf15069ab91cc013313c6662e6d /src/mongo/db/query/plan_cache_indexability_test.cpp | |
parent | 2bf8ac5739d517df9d762e25687eec4456738d49 (diff) | |
download | mongo-2b4474715604697acacca70c7f7647947b2c82f1.tar.gz |
SERVER-18309 have {$in: [.., null, ..]} not use sparse indexes
Closes #979
Signed-off-by: Jason Rassi <rassi@10gen.com>
Diffstat (limited to 'src/mongo/db/query/plan_cache_indexability_test.cpp')
-rw-r--r-- | src/mongo/db/query/plan_cache_indexability_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/query/plan_cache_indexability_test.cpp b/src/mongo/db/query/plan_cache_indexability_test.cpp index bcc68a38864..01abda9e525 100644 --- a/src/mongo/db/query/plan_cache_indexability_test.cpp +++ b/src/mongo/db/query/plan_cache_indexability_test.cpp @@ -60,6 +60,11 @@ namespace { const IndexabilityDiscriminator& disc = discriminators[0]; ASSERT_EQ(true, disc(parseMatchExpression(BSON("a" << 1)).get())); ASSERT_EQ(false, disc(parseMatchExpression(BSON("a" << BSONNULL)).get())); + ASSERT_EQ(true, + disc(parseMatchExpression(BSON("a" << BSON("$in" << BSON_ARRAY(1)))).get())); + ASSERT_EQ(false, + disc(parseMatchExpression(BSON("a" << + BSON("$in" << BSON_ARRAY(BSONNULL)))).get())); } // Test sparse index discriminators for a compound sparse index. |