Documentation Home
MySQL Connector/C++ Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 300.9Kb
PDF (A4) - 300.3Kb
HTML Download (TGZ) - 65.5Kb
HTML Download (Zip) - 118.4Kb


MySQL Connector/C++ Release Notes  /  Changes in MySQL Connector/C++ 8.0  /  Changes in MySQL Connector/C++ 8.0.21 (2020-07-13, General Availability)

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

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)