diff options
Diffstat (limited to 'jstests/eval_nolock.js')
-rw-r--r-- | jstests/eval_nolock.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/eval_nolock.js b/jstests/eval_nolock.js new file mode 100644 index 0000000..2688ec5 --- /dev/null +++ b/jstests/eval_nolock.js @@ -0,0 +1,16 @@ + +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" ) + |