summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/update.h
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2012-01-30 20:07:38 -0800
committerAaron <aaron@10gen.com>2012-02-06 22:12:28 -0800
commite5d3da81edd6d094678afa6a93a761389c2b2702 (patch)
tree9d36417461644a8b49422974cb6e514ee1270cca /src/mongo/db/ops/update.h
parent1578b86d2e6ece9c60b69d8a2db84d9da07d459f (diff)
downloadmongo-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.h3
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 {