blob: a848899f4affca5212c85c9fb5169ff8f728d5d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Cannot implicitly shard accessed collections because of following errmsg: A single
// update/delete on a sharded collection must contain an exact match on _id or contain the shard
// key.
// @tags: [assumes_unsharded_collection]
t = db.set5;
t.drop();
function check(want, err) {
var x = t.findOne();
delete x._id;
assert.docEq(want, x, err);
}
t.update({a: 5}, {$set: {a: 6, b: null}}, true);
check({a: 6, b: null}, "A");
t.drop();
t.update({z: 5}, {$set: {z: 6, b: null}}, true);
check({b: null, z: 6}, "B");
|