diff options
author | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:05:43 +0100 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2011-03-17 00:05:43 +0100 |
commit | 582fc32574a3b158c81e49cb00e6ae59205e66ba (patch) | |
tree | ac64a3243e0d2121709f685695247052858115c8 /jstests/eval_nolock.js | |
parent | 2761bffa96595ac1698d86bbc2e95ebb0d4d6e93 (diff) | |
download | mongodb-582fc32574a3b158c81e49cb00e6ae59205e66ba.tar.gz |
Imported Upstream version 1.8.0
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" ) + |