Skip to content

Commit b2c2fc5

Browse files
authored
CDRIVER-4373 do not set bulk let option unnecessarily (#978)
1 parent 7c281f2 commit b2c2fc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libmongoc/src/mongoc/mongoc-collection.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3228,7 +3228,10 @@ mongoc_collection_create_bulk_operation_with_opts (
32283228
write_flags,
32293229
wc);
32303230

3231-
mongoc_bulk_operation_set_let (bulk, &bulk_opts.let);
3231+
if (!bson_empty (&bulk_opts.let)) {
3232+
mongoc_bulk_operation_set_let (bulk, &bulk_opts.let);
3233+
}
3234+
32323235
bulk->session = bulk_opts.client_session;
32333236
if (err.domain) {
32343237
/* _mongoc_bulk_opts_parse failed, above */

0 commit comments

Comments
 (0)