Documentation Home
MySQL Connector/C++ Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 301.4Kb
PDF (A4) - 300.9Kb


MySQL Connector/C++ Release Notes  /  Changes in MySQL Connector/C++ 8  /  Changes in MySQL Connector/C++ 8.0.11 (2018-04-19, General Availability)

Changes in MySQL Connector/C++ 8.0.11 (2018-04-19, General Availability)

For MySQL Connector/C++ 8.0.11 and higher, Commercial and Community distributions require the Visual C++ Redistributable for Visual Studio 2015 to work on Windows platforms. The Redistributable is available at the Microsoft Download Center; install it before installing Connector/C++.

Functionality Added or Changed

  • Incompatible Change: When documents without an _id attribute are added to a collection, the server now automatically generates IDs for them. The server determines the ID format, which should be considered opaque from the API perspective (they are no longer UUID-based). As before, no _id attribute is generated if a document already contains one. User-provided document IDs must not conflict with IDs of other documents in the collection.

    This capability requires a MySQL 8.0 GA server. If the server does not support document ID generation, the document-add operation returns an error indicating that document IDs were missing.

    For X DevAPI, the generated IDs resulting from a document-add operation can be obtained using the new Result.getGeneratedIds() method, which returns a list. For X DevAPI for C, the generated IDs can be obtained using the new mysqlx_fetch_generated_id() function, which returns IDs one by one for successive calls, until it returns NULL to indicate no more generated IDs are available. For both X DevAPI and X DevAPI for C, document IDs specified explicitly in added documents are not returned.

    Incompatibility: The getGeneratedIds() method replaces getDocumentId() and getDocumentIds(), which are now removed. The mysqlx_fetch_generated_id() function replaces mysqlx_fetch_doc_id(), which is now removed.

    For more information, see Working with Document IDs. (WL #11450)

  • A patch operation has been implemented that enables specifying a JSON-like object that describes the changes to apply to documents in a collection.

    For X DevAPI, the CollectionModify operation supports a new patch() clause for patching documents. For X DevAPI for C, there are two new functions: mysqlx_collection_modify_patch() directly executes patching on documents in a collection that satisfy given criteria. mysqlx_set_modify_patch() adds a patch operation to a modify statement created with the mysql_collection_modify_new() function. (WL #11205)

  • For connections to the server made using the legacy JDBC API (that is, not made using X DevAPI or X DevAPI for C), Connector/C++ 8.0 now supports an OPT_GET_SERVER_PUBLIC_KEY connection option that enables requesting the RSA public key from the server. For accounts that use the caching_sha2_password or sha256_password authentication plugin, this key can be used during the connection process for RSA key-pair based password exchange with TLS disabled. This capability requires a MySQL 8.0 GA server, and is supported only for Connector/C++ built using OpenSSL. (WL #11719)

Bugs Fixed

  • Single-document methods such as Collection.replaceOne() did not accept expr() as the document specification, but instead treated it as a plain JSON string. (Bug #27677910)

  • Compiling X DevAPI and X DevAPI for C test programs failed with an error. (Bug #27610760)

  • Connecting with an incorrect SSL_CA value could result in a memory leak. (Bug #27434254)

  • For debug builds, specifying a document as _id raised an assertion rather than producing an error. (Bug #27433969)