Skip to content

Commit 27f2075

Browse files
committed
SERVER-4772: mongo constructor is only local if executed on server
1 parent 8e1f7f0 commit 27f2075

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jstests/slowNightly/dur_big_atomic_update.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ for (var i=0; i<1024; i++){
1212
d.foo.insert({_id:i});
1313
}
1414

15-
big_string = 'x';
15+
big_string = 'xxxxxxxxxxxxxxxx';
1616
while (big_string.length < 1024*1024) {
1717
big_string += big_string;
1818
}
@@ -31,9 +31,9 @@ for (var i=0; i<1024; i++){
3131

3232
// Do it again but in a db.eval
3333
d.eval(
34-
function(host, big_string) {
35-
new Mongo(host).getDB("test").foo.update({}, {$set: {big_string: big_string}}, false, /*multi*/true)
36-
}, conn.host, big_string); // Can't pass in connection or DB objects
34+
function(big_string) {
35+
new Mongo().getDB("test").foo.update({}, {$set: {big_string: big_string}}, false, /*multi*/true)
36+
}, big_string); // Can't pass in connection or DB objects
3737

3838
err = d.getLastErrorObj();
3939

0 commit comments

Comments
 (0)