summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2011-06-15 16:22:32 -0700
committerAaron <aaron@10gen.com>2011-06-15 21:03:06 -0700
commitfc3f8343201cabcc1a5c99b7f6a12f5c25647b9b (patch)
tree13480f80c1e96ff4fc352279932d3ddf8338f97b /jstests
parentd7908f6e0daab547c5ecde9417db8a153ac640eb (diff)
downloadmongo-fc3f8343201cabcc1a5c99b7f6a12f5c25647b9b.tar.gz
SERVER-3192 require atomic specifier to be top level
Diffstat (limited to 'jstests')
-rw-r--r--jstests/remove2.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/remove2.js b/jstests/remove2.js
index ff122a064b4..eb4ef074713 100644
--- a/jstests/remove2.js
+++ b/jstests/remove2.js
@@ -21,6 +21,11 @@ function g() {
t.save( { x:[7,8,9], z:"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } );
t.remove( {x : {$gte:3}, $atomic:x++ } );
+
+ assert( !db.getLastError() );
+ // $atomic within $and is not allowed.
+ t.remove( {x : {$gte:3}, $and:[{$atomic:true}] } );
+ assert( db.getLastError() );
assert( t.findOne({x:3}) == null );
assert( t.findOne({x:8}) == null );