Dear MySQL users,
MySQL Connector/C++ 8.0.13 is a new release version of the MySQL
Connector/C++ 8.0 series.
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”
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.13, see the “Generally Available (GA)
Releases” tab at
https://dev.mysql.com/downloads/connector/cpp/
Changes in MySQL Connector/C++ 8.0.13 (2018-10-22, General Availability)
* Character Set Support
* Packaging Notes
* X DevAPI Notes
* Functionality Added or Changed
* Bugs Fixed
Character Set Support
* For connections to the server made using the legacy JDBC
API (that is, not made using X DevAPI or X DevAPI for C),
the default connection character set is now utf8mb4
rather than utf8. Connections to the server made using X
DevAPI or X DevAPI for C continue to use the connection
character set determined by the server. (Bug #28204677)
Packaging Notes
* Connector/C++ 32-bit MSI packages are now available for
Windows. These 32-bit builds enable use of the legacy
JDBC connector.
* Connector/C++ compressed tar file packages are now
available for Solaris.
It is also possible to build Connector/C++ from source on
Solaris. For platform-specific build notes, see Building
Connector/C++ Applications: Platform-Specific Considerations
(http://dev.mysql.com/doc/connector-cpp/8.0/en/connector-cpp-apps-platform-considerations.html).
X DevAPI Notes
* Connector/C++ now provides connection pooling for
applications using X Protocol. This capability is based
on client objects, a new type of X DevAPI object. A
client can be used to create sessions, which take
connections from a pool managed by that client. For a
complete description, see Connecting to a Single MySQL
Server Using Connection Pooling
(http://dev.mysql.com/doc/x-devapi-userguide/en/connecting-connection-pool.html).
X DevAPI example:
using namespace mysqlx;
Client cli("user:password@host_name/db_name", ClientOption::POOL_MAX_SIZE, 7);
Session sess = cli.getSession();
// use sess as before
cli.close(); // close session sess
X DevAPI for C example:
char error_buf[255];
int error_code;
mysqlx_client_t *cli
= mysqlx_get_client_from_url(
"user:password@host_name/db_name", "{ \"maxSize\": 7 }", error_buf, &error_code);
mysqlx_session_t *sess = mysqlx_get_session_from_client(cli);
// use sess as before
mysqlx_close_client(cli); // close session sess
* For X DevAPI, a new connect-timeout option can be
specified in connection strings or URIs to indicate a
connection timeout in milliseconds. The
SessionSettings::Options object supports a new
CONNECT_TIMEOUT option.
For X DevAPI for C, the mysqlx_opt_type_t constant is
MYSQLX_OPT_CONNECT_TIMEOUT together with the
OPT_CONNECT_TIMEOUT() macro.
If no timeout option is specified, the default is 10000
(10 seconds). A value of 0 disables the timeout. The
following examples set the connection timeout to 10
milliseconds:
X DevAPI examples:
Session sess("user@host/db?connect-timoeut=10");
Session sess(..., SessionOption::CONNECT_TIMEOUT, 10, ...);
Session sess(
...,
SessionOption::CONNECT_TIMEOUT, std::chrono::milliseconds(10),
...
);
X DevAPI for C example:
mysqlx_session_options_t *opt = mysqlx_session_options_new();
mysqlx_session_option_set(opt, ..., OPT_CONNECT_TIMEOUT(10), ...);
Functionality Added or Changed
* JSON: Connector/C++ now uses RapidJSON for improved
performance of operations that involve parsing JSON
strings. There are no user-visible API changes for X
DevAPI or X DevAPI for C.
Bugs Fixed
* On SLES 15, Connector/C++ installation failed if
libmysqlcppcon7 was already installed. (Bug #28658120)
* Applications that were statically linked to the legacy
JDBC connector could encounter a read access violation at
exit time due to nondeterministic global destruction
order. (Bug #28525266, Bug #91820)
* Configuring with -DCMAKE_BUILD_TYPE=Release did not work
on Linux. (Bug #28045274)
* Field references in .having() expressions could be
interpreted incorrectly and produce errors.
(Bug #26310713)
Enjoy and thanks for the support!
On Behalf of Oracle/MySQL Release Engineering Team,
Balasubramanian Kandasamy