summaryrefslogtreecommitdiff
path: root/src/mongo/s
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2016-08-26 16:23:22 -0400
committerDavid Storch <david.storch@10gen.com>2016-09-02 10:24:02 -0400
commit231de89b7c8e84b7b6cf638008b483ecab6ba1b6 (patch)
tree2b0143e02e4aa93ffee23c2a412264309f383d1e /src/mongo/s
parent54488beeea99b3046931109c170d7e51cea0964d (diff)
downloadmongo-231de89b7c8e84b7b6cf638008b483ecab6ba1b6.tar.gz
SERVER-24508 BSONElement::ComparatorInterface
Diffstat (limited to 'src/mongo/s')
-rw-r--r--src/mongo/s/commands/cluster_shard_collection_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
index 1f580f97493..9c9df5eead2 100644
--- a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
+++ b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp
@@ -34,6 +34,7 @@
#include <set>
#include <vector>
+#include "mongo/bson/simple_bsonelement_comparator.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/bson/util/bson_extract.h"
#include "mongo/client/connpool.h"
@@ -349,7 +350,7 @@ public:
BSONObj currentKey = idx["key"].embeddedObject();
// Check 2.i. and 2.ii.
if (!idx["sparse"].trueValue() && idx["filter"].eoo() && idx["collation"].eoo() &&
- proposedKey.isPrefixOf(currentKey)) {
+ proposedKey.isPrefixOf(currentKey, SimpleBSONElementComparator::kInstance)) {
// We can't currently use hashed indexes with a non-default hash seed
// Check v.
// Note that this means that, for sharding, we only support one hashed index