summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/idhack.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2016-06-22 18:19:31 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2016-07-08 10:16:56 -0400
commit99d405ae814d9840c029bcb6916cc94aa03b9b68 (patch)
treee313172e17b1a66ad840afa1b3cce0e7582de3c2 /src/mongo/db/exec/idhack.cpp
parent44599a88f8f230d110363f638eb942ea7e071bf6 (diff)
downloadmongo-99d405ae814d9840c029bcb6916cc94aa03b9b68.tar.gz
SERVER-23924 Make _id index inherit the collection's default collation
Diffstat (limited to 'src/mongo/db/exec/idhack.cpp')
-rw-r--r--src/mongo/db/exec/idhack.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/exec/idhack.cpp b/src/mongo/db/exec/idhack.cpp
index b1113be2e9e..fd392ac91ab 100644
--- a/src/mongo/db/exec/idhack.cpp
+++ b/src/mongo/db/exec/idhack.cpp
@@ -226,11 +226,12 @@ void IDHackStage::doInvalidate(OperationContext* txn, const RecordId& dl, Invali
}
// static
-bool IDHackStage::supportsQuery(const CanonicalQuery& query) {
+bool IDHackStage::supportsQuery(Collection* collection, const CanonicalQuery& query) {
return !query.getQueryRequest().showRecordId() && query.getQueryRequest().getHint().isEmpty() &&
- query.getQueryRequest().getCollation().isEmpty() && !query.getQueryRequest().getSkip() &&
+ !query.getQueryRequest().getSkip() &&
CanonicalQuery::isSimpleIdQuery(query.getQueryRequest().getFilter()) &&
- !query.getQueryRequest().isTailable();
+ !query.getQueryRequest().isTailable() &&
+ CollatorInterface::collatorsMatch(query.getCollator(), collection->getDefaultCollator());
}
unique_ptr<PlanStageStats> IDHackStage::getStats() {