diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-06-22 18:19:31 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2016-07-08 10:16:56 -0400 |
commit | 99d405ae814d9840c029bcb6916cc94aa03b9b68 (patch) | |
tree | e313172e17b1a66ad840afa1b3cce0e7582de3c2 /src/mongo/db/exec/idhack.cpp | |
parent | 44599a88f8f230d110363f638eb942ea7e071bf6 (diff) | |
download | mongo-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.cpp | 7 |
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() { |