blob: 8d0bacbb3e5cfcdebf1b34b9c473c2b65f5cec52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Regression test for SERVER-13516 crash
var t = db.jstests_pop_server_13516;
t.drop();
var id = NumberInt(0);
var object = {
_id: id,
data: []
};
for (var i = 0; i < 4096; i++) {
object.data[i] = 0;
}
t.insert(object);
t.update({_id: id}, {$pop: {data: -1}});
var modified = t.findOne();
assert.eq(4095, modified.data.length);
|