MongoDB shell version: 2.5.3
connecting to: test
Server has startup warnings:
2013-11-03T19:16:05.526-0500 [initandlisten]
2013-11-03T19:16:05.526-0500 [initandlisten] ** NOTE: This is a development version (2.5.3) of MongoDB.
2013-11-03T19:16:05.526-0500 [initandlisten] ** Not recommended for production.
2013-11-03T19:16:05.526-0500 [initandlisten]
> var bytes=(16 * 1024 * 1024) - (4 + 6 + 5);
> var hex=""
> for ( var i = 0; i < bytes; ++i ) { hex=hex+"00"; } ; db.test.insert( { "_id" : HexData( 0, hex ) } )
> db.test.find({}, { _id : 0 } )
{ }
> db.test.aggregate( { $match : {} } )
assert: command failed: {
"errmsg" : "exception: Tried to create string longer than 16MB",
"code" : 16493,
"ok" : 0
} : aggregate with cursor failed
Error: Printing Stack Trace
at printStackTrace (src/mongo/shell/utils.js:38:15)
at doassert (src/mongo/shell/assert.js:6:5)
at Function.assert.commandWorked (src/mongo/shell/assert.js:238:5)
at DBCollection.aggregate (src/mongo/shell/collection.js:907:12)
at (shell):1:9
2013-11-03T19:23:27.549-0500 command failed: {
"errmsg" : "exception: Tried to create string longer than 16MB",
"code" : 16493,
"ok" : 0
} : aggregate with cursor failed at src/mongo/shell/assert.js:7
> Object.bsonsize( db.test.findOne({}) )
16777216