Releases: mongodb/mongo-c-driver
mongo-c-driver 2.1.2
Announcing 2.1.2 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
No changes since 2.1.1. Version incremented to match the libmongoc version.
libmongoc
Fixes
- Fix write command options handling.
 
Links:
Thanks to everyone who contributed to this release.
- Ezra Chung
 - Kevin Albertson
 
mongo-c-driver 1.30.6
Announcing 1.30.6 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
No changes since 1.30.5. Version incremented to match the libmongoc version.
libmongoc
Fixes:
- Fix write command options handling.
 
Links:
Thanks to everyone who contributed to this release.
- Ezra Chung
 - Kevin Albertson
 
mongo-c-driver 2.1.1
Announcing 2.1.1 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
No changes since 2.1.0. Version incremented to match the libmongoc version.
libmongoc
Fixes
- Do not propagate 
-fPICin CMake targets. - Apply write command behavior to 
mongoc_collection_create_indexes_with_opts. - Omit 
saslSupportedMechsin single-threaded monitoring commands. 
Links:
Thanks to everyone who contributed to this release.
- Julia Garland
 - Roberto C. Sánchez
 
mongo-c-driver 2.1.0
Announcing 2.1.0 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
Fixes
- The uninstall script for Windows is fixed so it no longer "succeeds" with a non-zero 
%ERRORLABEL%value. - The uninstall script for non-Windows environments now calls 
find "$dir" -maxdepth 1instead ofls --almost-all "$dir"when detecting non-empty directories to fix macOS compatibility. 
Changed
- The CMake project now sets a CMake policy max version of 
4.0(previously unset). 
Removed
- Support for Debian 9 and Debian 10.
 
libmongoc
Fixes
- Windows Secure Channel is fixed to support newer signatures to verify client certificates.
 - Replace use of 
rand()with thread-safe alternatives. - The uninstall script for Windows is fixed so it no longer "succeeds" with a non-zero 
%ERRORLABEL%value. - The uninstall script for non-Windows environments now calls 
find "$dir" -maxdepth 1instead ofls --almost-all "$dir"when detecting non-empty directories to fix macOS compatibility. 
Improvements
- Remove unhelpful long-lived buffers to reduce memory usage.
 - Improve error messages produced by Windows APIs.
 
Notes
- The minimum supported MongoDB Server version is raised from 4.0 to 4.2. This is in accordance with MongoDB Software Lifecycle Schedules.
 
Changes
- The CMake project now sets a CMake policy max version of 
4.0(previously unset). 
Removed
- Support for Debian 9 and Debian 10.
 
Links:
Thanks to everyone who contributed to this release.
- Kevin Albertson
 - Ezra Chung
 - Colby Pike
 - Adrian Dole
 - Azat Khuzhin
 - Jeroen Ooms
 - Roberto C. Sánchez
 - Micah Scott
 
mongo-c-driver 2.0.2
Announcing 2.0.2 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
Fixes:
- Various fixes have been applied to the 
bson_validatefamily of functions,
with some minor behavioral changes.- Previously accepted invalid UTF-8 will be rejected when 
BSON_VALIDATE_UTF8
is specified. - The scope document in a deprecated "code with scope" element is now
validated with a fixed set of rules and is treated as an opaque JavaScript
object. - A document nesting limit is now enforced during validation.
 
 - Previously accepted invalid UTF-8 will be rejected when 
 
libmongoc
Fixes:
- Fix message of 
bson_strerror_ron Windows. - Fix memory leaks with Windows Secure Channel.
 - Fix loading PKCS#8 RSA keys with Windows Secure Channel.
 
Links:
Thanks to everyone who contributed to this release.
- Kevin Albertson
 - Colby Pike
 
mongo-c-driver 1.30.5
Announcing 1.30.5 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
Fixes:
- Various fixes have been applied to the 
bson_validatefamily of functions,
with some minor behavioral changes.- Previously accepted invalid UTF-8 will be rejected when 
BSON_VALIDATE_UTF8
is specified. - The scope document in a deprecated "code with scope" element is now
validated with a fixed set of rules and is treated as an opaque JavaScript
object. - A document nesting limit is now enforced during validation.
 
 - Previously accepted invalid UTF-8 will be rejected when 
 
libmongoc
Fixes:
- Fix message of 
bson_strerror_ron Windows. - Fix memory leaks with Windows Secure Channel.
 - Fix loading PKCS#8 RSA keys with Windows Secure Channel.
 
Links:
Thanks to everyone who contributed to this release.
- Kevin Albertson
 - Colby Pike
 
mongo-c-driver 2.0.1
Announcing 2.0.1 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
Fixes:
- Fix CMake configure error on macOS with CMake 4.
 
libmongoc
Fixes:
- Fix username handling for MONGODB-X509 authentication when C driver is configured to use Secure Transport (CMake option 
ENABLE_SSL=DARWIN) or Secure Channel (CMake optionENABLE_SSL=WINDOWS). - Do not set empty partial result on client error for 
mongoc_bulkwrite_execute. 
Links:
Thanks to everyone who contributed to this release.
- Kevin Albertson
 
mongo-c-driver 1.30.4
Announcing 1.30.4 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
No changes since 1.30.3. Version incremented to match the libmongoc version.
libmongoc
Fixes:
- Fix username handling for MONGODB-X509 authentication when C driver is configured to use Secure Transport (CMake option 
ENABLE_SSL=DARWIN) or Secure Channel (CMake optionENABLE_SSL=WINDOWS). - Do not set empty partial result on client error for 
mongoc_bulkwrite_execute. 
Links:
Thanks to everyone who contributed to this release.
- Kevin Albertson
 
mongo-c-driver 1.30.3
Announcing 1.30.3 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
Fixes:
- Fix CMake configure error on macOS with CMake 4.
 
New Features:
- 
In anticipation of the 2.0 release of mongo-c-driver, new CMake packages and
imported targets have been defined (for bothbsonandmongoc). To import
bsonwith the new names, callfind_packagefor thebsonpackage. The new
imported targets are namedbson::static,bson::shared, andbson::bson
(which points to either the static or the shared library, depending on an
import-time configuration option).The new package and target names will remain unchanged when upgrading to the
2.0 release, allowing consumers to support both major versions without
modifying their CMake project. The current imported target names will be
removed from the 2.0 release, and should not be used for
forward-compatibility. 
libmongoc
New Features:
- 
In anticipation of the 2.0 release of mongo-c-driver, new CMake packages and
imported targets have been defined (for bothbsonandmongoc). To import
mongocwith the new names, callfind_packagefor themongocpackage. The
new imported targets are namedmongoc::static,mongoc::shared, and
mongoc::mongoc(which points to either the static or the shared library,
depending on an import-time configuration option).The new package and target names will remain unchanged when upgrading to the
2.0 release, allowing consumers to support both major versions without
modifying their CMake project. The current imported target names will be
removed from the 2.0 release, and should not be used for
forward-compatibility.Programs that link to BSON libraries directly should also use the new target
namesbson::static,bson::shared, orbson::bson. 
Links:
Thanks to everyone who contributed to this release.
- Kevin Albertson
 - Ezra Chung
 - Colby Pike
 
mongo-c-driver 2.0.0
Announcing 2.0.0 of libbson and libmongoc, the libraries constituting the MongoDB C Driver.
libbson
New Features
- Add support for BSON Binary Vector.
 
Changes
BSON_ERROR_BUFFER_SIZEis reduced from504to503to reserve the final byte for internal use.- The data layout of 
bson_error_tremains otherwise unchanged: the size is still 512 bytes and the offset of the.code,.domain, and.messagedata members remain unchanged. 
- The data layout of 
 - The pkg-config files 
libbson-1.0andlibbson-static-1.0have been renamed tobson2, andbson2-static, respectively. 
CMake Packages and Imported Targets
The bson-1.0 CMake package has been removed. Instead, use or bson, and
specify a version or version range to be imported:
find_package(bson 1.30...2.0)The new package imports different target names:
mongo::bson_static→bson::staticmongo::bson_shared→bson::shared- The target 
bson::bsonis a shim target that points to either the shared library or the static library. 
Removals
bson_as_jsonandbson_array_as_jsonare removed due to producing non-portable Legacy Extended JSON. Prefer Canonical Extended JSON or Relaxed Extended JSON for portability. To continue using Legacy Extended JSON, usebson_as_legacy_extended_jsonandbson_array_as_legacy_extended_json.- Compiling with 
BSON_MEMCHECKdefined now has no effect. - Remove deprecated integral comparison interfaces: 
bson_in_range_*andbson_cmp_*. - Remove deprecated atomic and threading interfaces: 
bson_atomic_*andbson_thrd_yield. - The deprecated 
ENABLE_EXTRA_ALIGNMENTCMake option is removed.bson_tandbson_iter_tare now aligned to the size of a pointer instead of128.bson_error_t,bson_value_t, andbson_visitor_tare now aligned to the size of a pointer instead of8.BSON_ALIGNED_BEGINandBSON_ALIGNED_ENDnow unconditionally apply their requested alignment.
 - Remove deprecated 
bson_copy_to_excluding. Usebson_copy_to_excluding_noinitinstead. 
libmongoc
New Features
- Support aggregate operations with 
$lookupstage for In-Use Encryption. 
Notes
- In a future minor release the minimum supported MongoDB Server version will be raised from 4.0 to 4.2. This is in accordance with MongoDB Software Lifecycle Schedules.
 - Raise required version of libmongocrypt to 1.13.0 to support In-Use Encryption (corresponds to the CMake option: 
ENABLE_CLIENT_SIDE_ENCRYPTION). 
Changes
- Passing 
batchSize:0as an option tomongoc_client_watch,mongoc_database_watch, ormongoc_collection_watch
now appliesbatchSize:0to theaggregatecommand. Useful to request an immediate cursor. Previously the value
was ignored. bson_oid_init_sequenceis removed. Usebson_oid_initinstead.mongoc_server_description_hostchanges the return type frommongoc_host_list_t *toconst mongoc_host_list_t *.- URI authentication credentials validation (only applicable during creation of a new 
mongoc_uri_tobject from a connection string):- The requirement that a username is non-empty when specified is now enforced regardless of authentication mechanism.
 - Username and password specification requirements are now validated and returns a client error for the specified authentication mechanism.
- e.g. it is a client error to not specify a username or a password for SCRAM-SHA-1, SCRAM-SHA-256, and PLAIN.
 - e.g. it is a client error to specify a password for MONGODB-X509.
 - e.g. it is a client error to specify a username or a password without the other for MONGODB-AWS.
 
 authSourceis now correctly defaulted to"$external"for MONGODB-AWS (instead of the database name or"admin").authMechanismis now validated and returns a client error for invalid or unsupported values.authMechanismPropertiesis now validated and returns a client error for invalid or unsupported properties for the specified authentication mechanism.authMechanismPropertiesnow correctly supports':'within property values.- Old behavior: 
authMechanismProperties=A:B,C:D:E,F:Gis parsed as{'A': 'B', 'C': 'D:E,F:G'}. - New behavior: 
authMechanismProperties=A:B,C:D:E,F:Gis parsed as{'A': 'B': 'C': 'D:E', 'F': 'G'}. 
- Old behavior: 
 
 - Calling 
mongoc_bulk_operation_executeon the samemongoc_bulk_operation_trepeatedly is an error. Previously this was only discouraged in documentation. - Consistently apply 
__cdeclcalling convention to function declarations in public API. Intended to support consumers building their code using a different default calling convention with MSVC. The mongoc and bson libraries only support being built with the__cdecldefault calling convention. mongoc_client_set_ssl_optsnow ignores a pooledmongoc_client_tand logs an error. Usemongoc_client_pool_set_ssl_optsto set TLS options on amongoc_client_pool_tbefore popping any clients.mongoc_client_set_ssl_stream_initiatornow ignores a pooledmongoc_client_tand logs an error.- The pkg-config files 
libmongoc-1.0,libmongoc-static-1.0,libbson-1.0, andlibbson-static-1.0have been renamed tomongoc2,mongoc2-static,bson2, andbson2-static, respectively. 
CMake Packages and Imported Targets
The mongoc-1.0 (and bson-1.0) CMake packages have been removed. Instead, use
mongoc or bson, and specify a version or version range to be imported:
find_package(mongoc 1.30...2.0)The new packages import different target names:
mongo::mongoc_static→mongoc::staticmongo::mongoc_shared→mongoc::shared- The target 
mongoc::mongocis a shim target that points to either the shared library or the static library. 
The BSON library has had similar name changes.
Removals
- The 
bson_md5_tstruct and associated API is removed. - The client side matching feature, 
mongoc_matcher_tand related functions are removed. mongoc_server_description_ismasteris removed. Use the equivalentmongoc_server_description_helloinstead.MONGOC_QUERY_SLAVE_OKis removed. Use the equivalentMONGOC_QUERY_SECONDARY_OKinstead.MONGOC_URI_SLAVEOKis removed. It was unused.mongoc_client_command,mongoc_database_command, andmongoc_collection_commandare removed. Usemongoc_client_command_simple,mongoc_database_command_simple, andmongoc_collection_command_simpleinstead.MONGOC_URI_MAXIDLETIMEMSandMONGOC_URI_WAITQUEUEMULTIPLEare removed. They were unused.bson_string_tand associated functions are removed.- Support for 
ENABLE_SASL=CYRUSon Windows is removed. UseENABLE_SASL=SSPIorENABLE_SASL=OFFinstead.- The associated Windows-only option 
CYRUS_PLUGIN_PATH_PREFIXis removed. 
 - The associated Windows-only option 
 - Support for the deprecated 
minPoolSizeURI option is removed along with associated API:MONGOC_URI_MINPOOLSIZEandmongoc_client_pool_min_size. - Support for LibreSSL (the CMake option 
ENABLE_SSL=LIBRESSL) is removed. Associated API is removed (MONGOC_ENABLE_SSL_LIBRESSLandmongoc_stream_tls_libressl_new). MONGOC_WRITE_CONCERN_W_ERRORS_IGNORED(value -1) is removed. UseMONGOC_WRITE_CONCERN_W_UNACKNOWLEDGED(value 0) which is handled equivalently. If specified in a URI, replace:mongodb://host/?w=-1withmongodb://host/?w=0.- The deprecated CMake option 
ENABLE_AUTOMATIC_INIT_AND_CLEANUPis removed. See Initialization and cleanup for expected use ofmongoc_init()andmongoc_cleanup(). mongoc_client_get_database_namesis removed. Usemongoc_client_get_database_names_with_optsinstead.mongoc_client_find_databasesis removed. Usemongoc_client_find_databases_with_optsinstead.mongoc_client_get_max_message_sizeis removed.mongoc_client_get_max_bson_sizeis removed.- Deprecated 
mongoc_apm_command_*_get_server_connection_idfunctions are removed. Usemongoc_apm_command_*_get_server_connection_id_int64instead. - Deprecated index management API is removed:
mongoc_collection_create_index_with_opts,mongoc_collection_create_index, andmongoc_collection_ensure_indexare removed. Usemongoc_collection_create_indexes_with_optsinstead.mongoc_index_opt_t,mongoc_index_opt_geo_tmongoc_index_opt_wt_tare removed. Pass options usingbson_ttomongoc_collection_create_indexes_with_optsinstead.mongoc_collection_find_indexesis removed. Usemongoc_collection_find_indexes_with_optsinstead.- See MongoDB documentation for working with indexes.
 
 - Deprecated cursor API is removed:
mongoc_cursor_is_aliveis removed. Use the equivalentmongoc_cursor_moreinstead.mongoc_cursor_set_hintis removed. Use the equivalentmongoc_cursor_set_server_idinstead.mongoc_cursor_get_hintis removed. Use the equivalentmongoc_cursor_get_server_idinstead.mongoc_cursor_new_from_command_replyis removed. Usemongoc_cursor_new_from_command_reply_with_optsinstead.
 - Deprecated CRUD API is removed:
mongoc_collection_saveis removed. Usemongoc_collection_insert_oneormongoc_collection_replace_oneinstead.mongoc_collection_deleteis removed. Usemongoc_collection_delete_oneormongoc_collection_delete_manyinstead.mongoc_delete_flags_tandmongoc_reply_flags_tare removed.mongoc_collection_findis removed. Usemongoc_collection_find_with_optsinstead.mongoc_collection_insert_bulkis removed. Usemongoc_collection_insert_manyinstead.mongoc_collection_create_bulk_operationis removed. Use `mongoc_collection_create_bulk_operation_wi...