diff options
author | Aaron <aaron@10gen.com> | 2012-01-30 20:07:38 -0800 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2012-02-06 22:12:28 -0800 |
commit | e5d3da81edd6d094678afa6a93a761389c2b2702 (patch) | |
tree | 9d36417461644a8b49422974cb6e514ee1270cca /src/mongo/db/ops/update.h | |
parent | 1578b86d2e6ece9c60b69d8a2db84d9da07d459f (diff) | |
download | mongo-e5d3da81edd6d094678afa6a93a761389c2b2702.tar.gz |
SERVER-4777 avoid 'weird case' assertion on modifier update with duplicate field names by applying updates to the first duplicate field provided by BSONObjIteratorSorted and passing through the remaining duplicates
Diffstat (limited to 'src/mongo/db/ops/update.h')
-rw-r--r-- | src/mongo/db/ops/update.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mongo/db/ops/update.h b/src/mongo/db/ops/update.h index a2f0342f42f..c7e4533df84 100644 --- a/src/mongo/db/ops/update.h +++ b/src/mongo/db/ops/update.h @@ -642,6 +642,9 @@ namespace mongo { } + /** @return true iff the elements aren't eoo(), are distinct, and share a field name. */ + static bool duplicateFieldName( const BSONElement &a, const BSONElement &b ); + public: bool canApplyInPlace() const { |