summaryrefslogtreecommitdiff
path: root/jstests/eval_nolock.js
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-03-17 00:05:43 +0100
committerAntonin Kral <a.kral@bobek.cz>2011-03-17 00:05:43 +0100
commit582fc32574a3b158c81e49cb00e6ae59205e66ba (patch)
treeac64a3243e0d2121709f685695247052858115c8 /jstests/eval_nolock.js
parent2761bffa96595ac1698d86bbc2e95ebb0d4d6e93 (diff)
downloadmongodb-582fc32574a3b158c81e49cb00e6ae59205e66ba.tar.gz
Imported Upstream version 1.8.0
Diffstat (limited to 'jstests/eval_nolock.js')
-rw-r--r--jstests/eval_nolock.js16
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" )
+