Files
mongo/jstests/core/query/set/set5.js
Jason Zhang 28eb8d299b SERVER-80780 Merge writes without shard key jscore passthrough with existing passthrough suites (#20175)
GitOrigin-RevId: a54cc3a3df44359ea51533f062642ee841f71460
2024-04-08 02:28:42 +00:00

17 lines
302 B
JavaScript

let 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");