diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2018-08-20 14:18:30 -0400 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2018-09-17 17:21:40 -0400 |
commit | f99914d14b76718f1fef879cfaabe23c0c8f0857 (patch) | |
tree | e1da0b70c4d958cd59e671166bec0dc9ce9f3a57 /src/mongo/bson/bsonobj.cpp | |
parent | d246e38f3dad15b9919773ffe6a2fa59288034f2 (diff) | |
download | mongo-f99914d14b76718f1fef879cfaabe23c0c8f0857.tar.gz |
SERVER-36606: Allow construction of large BSON objects
Diffstat (limited to 'src/mongo/bson/bsonobj.cpp')
-rw-r--r-- | src/mongo/bson/bsonobj.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp index 2fd01c2d8e2..0cbb7b91330 100644 --- a/src/mongo/bson/bsonobj.cpp +++ b/src/mongo/bson/bsonobj.cpp @@ -87,12 +87,12 @@ using namespace std; /* BSONObj ------------------------------------------------------------*/ -void BSONObj::_assertInvalid() const { +void BSONObj::_assertInvalid(int maxSize) const { StringBuilder ss; int os = objsize(); ss << "BSONObj size: " << os << " (0x" << integerToHex(os) << ") is invalid. " << "Size must be between 0 and " << BSONObjMaxInternalSize << "(" - << (BSONObjMaxInternalSize / (1024 * 1024)) << "MB)"; + << (maxSize / (1024 * 1024)) << "MB)"; try { BSONElement e = firstElement(); ss << " First element: " << e.toString(); |