0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/eval_nolock.js
2010-11-08 00:25:55 -05:00

17 lines
339 B
JavaScript

t = db.eval_nolock
t.drop();
for ( i=0; i<10; i++ )
t.insert( { _id : i } );
res = db.runCommand( { eval :
function(){
db.eval_nolock.insert( { _id : 123 } );
return db.eval_nolock.count();
}
, nlock : true } );
assert.eq( 11 , res.retval , "A" )