summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@10gen.com>2016-04-18 17:14:02 -0400
committerRobert Guo <robert.guo@10gen.com>2016-04-21 15:02:44 -0400
commit176011c910ac034210aa902917457d5a61c7a516 (patch)
treea15c2df2ea3922b67cbfabcc2173dd76a3f6f06e
parentd0324043bc99a713961e1fca0ffc8ea4b124d959 (diff)
downloadmongo-176011c910ac034210aa902917457d5a61c7a516.tar.gz
SERVER-23762 validate() should fail when encountering invalid BSON
(cherry picked from commit ce39e32d01e3a909948f850360040809ac7c8a8d) (cherry picked from commit 5089357158122b3c8b2c146210ac15fe9451c21c)
-rw-r--r--src/mongo/db/catalog/collection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/catalog/collection.cpp b/src/mongo/db/catalog/collection.cpp
index 89e58c10021..533f0d428d0 100644
--- a/src/mongo/db/catalog/collection.cpp
+++ b/src/mongo/db/catalog/collection.cpp
@@ -536,7 +536,7 @@ public:
const Status status = validateBSON(obj.objdata(), obj.objsize());
if (status.isOK())
*dataSize = obj.objsize();
- return Status::OK();
+ return status;
}
};
}