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

17 lines
339 B
JavaScript
Raw Normal View History

2010-11-08 06:25:11 +01:00
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" )