MySQL Connector/C++ 8.0.21 has been released
Posted by: Jocelyn Ramilison
Date: July 13, 2020 05:41AM
Date: July 13, 2020 05:41AM
Dear MySQL users, MySQL Connector/C++ 8.0.21 is a new release version of the MySQL Connector/C++ 8.0 series. Connector/C++ 8.0 can be used to access MySQL implementing Document Store or in a traditional way, using SQL queries. It allows writing both C++ and plain C applications using X DevAPI and X DevAPI for C. It also supports the legacy API of Connector/C++ 1.1 based on JDBC4. To learn more about how to write applications using X DevAPI, see "X DevAPI User Guide" at https://dev.mysql.com/doc/x-devapi-userguide/en/ See also "X DevAPI Reference" at https://dev.mysql.com/doc/dev/connector-cpp/devapi_ref.html and "X DevAPI for C Reference" at https://dev.mysql.com/doc/dev/connector-cpp/xapi_ref.html For generic information on using Connector/C++ 8.0, see https://dev.mysql.com/doc/dev/connector-cpp/ For general documentation about how to get started using MySQL as a document store, see http://dev.mysql.com/doc/refman/8.0/en/document-store.html To download MySQL Connector/C++ 8.0.21, see the "General Availability (GA) Releases" tab at https://dev.mysql.com/downloads/connector/cpp/ Changes in MySQL Connector/C++ 8.0.21 (2020-07-13, General Availability) Configuration Notes * The CMake configuration files were revised to work better when Connector/C++ is used as a subproject of application projects. Thanks to Lou Shuai for the contribution. This revision does not change the fact that the intended (and supported) usage scenario is to build the connector in a separate project, install it somewhere and then use it in application projects from that installed location (for example, by defining the imported library target in CMake). (Bug #31095993, Bug #99093) JSON Notes * The rapidjson library included with Connector/C++ has been upgraded to the GitHub snapshot of 16 January 2020. Security Notes * For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for Connector/C++ has been updated to version 1.1.1g. Issues fixed in the new OpenSSL version are described at https://www.openssl.org/news/cl111.txt and https://www.openssl.org/news/vulnerabilities.html. (Bug #31296689) X DevAPI Notes * For X DevAPI or X DevAPI for C applications, methods and functions that create or modify collections now accept options to enable validation of a JSON schema that documents must adhere to before they are permitted to be inserted or updated. Schema validation is performed by the server, which returns an error message if a document in a collection does not match the schema definition or if the server does not support validation. These new classes are implemented to support validation options: + CollectionOptions: The base class that has all options. Contains an Option enumeration with constants REUSE and VALIDATION. + CollectionValidation: Handles only subkey validation. Contains a Level enumeration with constants STRICT and OFF, and an Option enumeration with constants SCHEMA and LEVEL. X DevAPI now has these signatures for createCollection() (and modifyCollection()): // Accepts the full document createCollection("name", "JSON_Document"); // DbDoc usage is also permitted createCollection("name", DbDoc("validation", DbDoc("level","off",...))); // List of pairs with Option enum constant and value createCollection(CollectionOptions::REUSE, true, CollectionOptions::VALIDATION, CollectionValidation(...)); // Old REUSE way is also acceptable createCollection("name", true); createCollection("name", CollectionValidation(...)); // createCollection also allows a list of pairs of // CollectionValidation Option enum constant and value createCollection("name", CollectionOptions::VALIDATION, CollectionValidation::OFF, CollectionValidation::SCHEMA, "Object"); X DevAPI for C examples: These are the possible options for mysqlx_collection_options_set(): OPT_COLLECTION_VALIDATION_LEVEL(VALIDATION_OFF) OPT_COLLECTION_VALIDATION_SCHEMA("Object") OPT_COLLECTION_REUSE(true) Perform option operations like this: mysqlx_collection_options_t *options = mysqlx_collection_options_new() //creates collection options object mysqlx_free(options) //frees collection options mysqlx_collection_options_set(options,...); Creation and modification functions have these signatures: mysqlx_collection_create_with_options(mysqlx_schema_t *schema, mysqlx_collection_options_t *options); mysqlx_collection_create_with_json_options(mysqlx_schema_t *schema, const char* json_options); mysqlx_collection_modify_with_options(mysqlx_schema_t *schema, mysqlx_collection_options_t *options); mysqlx_collection_modify_with_json_options(mysqlx_schema_t *schema, const char* json_options); For modifications, the REUSE option is not supported and an error occurs if it is used. Functionality Added or Changed * The MySQL_Connection_Options enumeration is no longer sensitive to the order in which the underlying options are declared in the C API source. (Bug #30799197) * Connector/C++ now implements blocking of failed connection-pool endpoints to prevent them from being reused until a timeout period has elapsed. This should reduce average wait time for applications to obtain a connection from the pool in the event that endpoints become temporarily unavailable. Bugs Fixed * For applications that use the legacy JDBC API (that is, not X DevAPI or X DevAPI for C) on a system that does not have OpenSSL libraries installed, the libraries that are bundled with Connector/C++ could not be found when resolving run-time dependencies of the application. (Bug #31007317) * For a reply with multiple result sets (such as the result from a stored procedure that executed multiple queries), an error in reply processing logic could incorrectly deregister the reply object after reading the first result set while more result sets from the server were pending, resulting in an application error. (Bug #30989042) On Behalf of Oracle/MySQL Release Engineering Team, Hery Ramilison
Subject
Views
Written By
Posted
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.