MySQL Connector/C++ 8.0.5-dmr has been released

Dear MySQL users,

MySQL Connector/C++ 8.0.5-dmr is the next development milestone release of the MySQL Connector/C++ 8.0 series (formely 2.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++ applications using X DevAPI or plain C applications using XAPI.

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/

and “X DevAPI Reference” at

https://dev.mysql.com/doc/dev/connector-cpp/devapi_ref.html

For more information about using plain C XAPI see “XAPI 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/

Note

Connector/C++ 8.0 requires MySQL Server version 5.7.12 or higher with X Plugin enabled. For general documentation about how to get started using MySQL as a document store, see “Using MySQL as a Document Store”

https://dev.mysql.com/doc/refman/5.7/en/document-store.html

To download MySQL Connector/C++ 8.0.5-dmr, see the “Development Releases” tab at

https://dev.mysql.com/downloads/connector/cpp/



Changes in MySQL Connector/C++ 8.0.5-dmr (2017-07-10, development milestone)

   MySQL Connectors and other MySQL client tools and
   applications now synchronize the first digit of their version
   number with the (highest) MySQL server version they support.

   Future MySQL Connector/C++ 8.0 releases would be designed to
   support more/all features of MySQL server version 8 (or lower).
   This change makes it easy and intuitive to decide which
   client version to use for which server version."

   Connector/C++ 8.0.5-dmr is the first release to use the new
   numbering. It is the successor to Connector/C++ 2.0.4.

   Functionality Added or Changed

     * Connector/C++ now supports MySQL servers configured to
       use utf8mb4 as the default character set.

       Currently, Connector/C++ works only with UTF-8 and ASCII
       default character sets (utf8, utf8mb4, and ascii). If a
       user creates a table with text columns that use a
       non-UTF-8 character set, and this column holds a string
       with non-ASCII characters, errors will occur for attempts
       to access that string (for example, in a query result).

       On the other hand, if strings consist only of ASCII
       characters, correct result are obtained regardless of the
       character set. Also, it is always possible to obtain the
       raw bytes of the column value, for any character set.

     * The SqlResult class now implements the
       getAffectedRowsCount() and getAutoIncrementValue()
       X DevAPI methods. (Bug #25643081)

     * To avoid unintentional changes to all items in a
       collection, the Collection::modify() and
       Collection::remove() methods now require a nonempty
       selection expression as argument.

     * For X DevAPI or XAPI, when creating a new session,
       multiple hosts can be tried until a successful connection
       is established. A list of hosts can be given in a
       connection string or as session creation options, with or
       without priorities.

       X DevAPI examples:

         Session sess(
           "mysqlx://user:password@["
             "server.example.com,"
             "192.0.2.11:33060,"
             "[2001:db8:85a3:8d3:1319:8a2e:370:7348]:1"
           "]/database"
         );

         Session sess({ SessionSettings::USER, "user",
                        SessionSettings::PWD, "password,
                        SessionSettings::HOST, "server.example.com",
                        SessionSettings::HOST, "192.0.2.11",
                        SessionSettings::PORT, 33060,
                        SessionSettings::HOST, "[2001:db8:85a3:8d3:1319:8a2e:370:7348]",
                        SessionSettings::PORT, 1,
                        SessionSettings::DB, "database" });

       XAPI examples:

         sess = mysqlx_get_session_from_url(
                 "mysqlx://user:password@["
                    "(address=127.0.0.1,priority=2),"
                    "(address=example.com:1300,priority=100)"
                 "]/database",
                 err_msg, &err_code);

         mysqlx_opt_type_t *sess_opt = mysqlx_session_option_new();
         mysqlx_session_option_set(sess_opt,
           MYSQLX_OPT_USER, "user",
           MYSQLX_OPT_PWD, "password",
           MYSQLX_OPT_HOST, "127.0.0.1",
           MYSQLX_OPT_PRIORITY, 2,
           MYSQLX_OPT_HOST, "example.com",
           MYSQLX_OPT_PORT, 1300,
           MYSQLX_OPT_PRIORITY, 100,
           MYSQLX_OPT_DB, "database");

         mysqlx_session_t *sess = mysqlx_get_session_from_options(
           sess_opt, err_buf, &err_code
         );

     * The NodeSession class has been renamed to Session, and
       the XSession class has been removed.

     * Connections created using Session objects now are secure
       by default. Also, the ssl-enabled connection option has
       been replaced by ssl-mode. Permitted ssl-mode values are
       disabled, required (the default), verify_ca and
       verify_identity.

     * Option names within connection strings are now treated as
       case insensitive. Option values are still case sensitive
       by default.

   Bugs Fixed

     * It is now possible to call stmt.execute() multiple times.
       Calling methods that modify statement parameters should
       modify the statement sent with execute(). This is also
       true for binding new values to named parameters.
       (Bug #25858159)

     * Compiler errors occurred when creating a SessionSettings
       object due to ambiguity in constructor resolution.
       (Bug #25603191)

     * collection.add() failed to compile if called with two STL
       container arguments. (Bug #25510080)

     * These expression syntaxes are now supported:

         CHARSET(CHAR(X'65'))
         'abc' NOT LIKE 'ABC1'
         'a' RLIKE '^[a-d]'
         'a' REGEXP '^[a-d]'
         POSITION('bar' IN 'foobarbar')

       These expression syntaxes are not supported but a better
       error message is provided when they are used:

         CHARSET(CHAR(X'65' USING utf8))
         TRIM(BOTH 'x' FROM 'xxxbarxxx')
         TRIM(LEADING 'x' FROM 'xxxbarxxx')
         TRIM(TRAILING 'xyz' FROM 'barxxyz')
         'Heoko' SOUNDS LIKE 'h1aso'

       (Bug #25505482)

On Behalf of the MySQL/Oracle Release Engineering Team,
Kent Boortz

MySQL Connector/C++ 2.0.4 m2 has been released

MySQL Connector/C++ 2.0.4 is the next development milestone of the MySQL

Connector/C++ 2.0 series. Connector/C++ 2.0 can be used to access MySQL
implementing Document Store or in a traditional way, using SQL queries. It
allows writing both C++ applications using X DevAPI or plain C applications
using XAPI.

To learn more about how to write applications using X DevAPI, see X
DevAPI User Guide (http://dev.mysql.com/doc/x-devapi-userguide/en/) and X
DevAPI reference at
https://dev.mysql.com/doc/dev/connector-cpp/devapi_ref.html. For more
information about using plain C XAPI see XAPI reference at
http://dev.mysql.com/doc/dev/connector-cpp/xapi_ref.html. For generic
information on using Connector/C++ 2.0, see
http://dev.mysql.com/doc/dev/connector-cpp/.

Note

Connector/C++ 2.0 requires MySQL Server version 5.7.12 or higher
with X Plugin enabled. For general documentation about how to get
started using MySQL as a document store, see Using MySQL as a Document
Store (http://dev.mysql.com/doc/refman/5.7/en/document-store.html).

To download MySQL Connector/C++ 2.0.4, see the “Development Releases”
tab at http://dev.mysql.com/downloads/connector/cpp/

Changes in MySQL Connector/C++ 2.0.4 (2017-03-21, Development
Milestone)

Functionality Added or Changed

  • Support was added for secure sessions over TLS
    connections. A secure session can be requested either via
    the ssl-enable and ssl-ca options of a connection string,
    or using explicit session creation options. For X DevAPI
    session settings, see http://dev.mysql.com/doc/dev/connector-cpp/classmysqlx_1_1_session_settings.html.
    For XAPI session settings, see
    http://dev.mysql.com/doc/dev/connector-cpp/group__xapi.html
    (check the documentation for enum mysqlx_opt_type_t).
  • The format of document ID values generated when adding
    documents to a collation has changed. It is still a
    string of 32 hexadecimal digits based on UUID, but the
    order of digits was changed to match the requirement of a
    stable ID prefix.
  • The X DevAPI Schema object now supports methods for view
    manipulation: createView(), alterView(), and dropView().
    XAPI now contains functions that implement similar
    functionality: mysqlx_view_create(),
    mysqlx_view_replace(), mysqlx_view_modify(), and
    (implemented previously) mysqlx_view_drop().
    As with other XAPI operations, there are functions that
    create a statement handle without executing it:
    mysqlx_view_create_new(), mysqlx_view_replace_new(), and
    mysqlx_view_modify_new().
    These XAPI functions modify view DDL statements before
    execution: mysqlx_set_view_algorithm(),
    mysqlx_set_view_security(),
    mysqlx_set_view_check_option(),
    mysqlx_set_view_definer(), and mysqlx_set_view_columns().
  • Connector/C++ now supports IPv6 target hosts in
    connection strings and when creating sessions using other
    methods.

Bugs Fixed

  • When rList is an empty list, table.insert().rows(rList)
    caused a segmentation fault. (Bug #25515964)

On Behalf of the MySQL/ORACLE RE Team

MySQL Connector/C++ 1.1.8 has been released

Dear MySQL Users,

A new GA (general availability) version of MySQL Connector/C++ has
been made available: MySQL Connector/C++ 1.1.8 GA. The MySQL
Connector/C++ provides a C++ API for connecting client applications to
the MySQL Server 5.5 or newer.

You can download the production release at:

http://dev.mysql.com/downloads/connector/cpp/1.1.html

MySQL Connector C++ (Commercial) will be available for download on the
My Oracle Support (MOS) website. This release will be available on eDelivery
(OSDC) in next month’s upload cycle.

The MySQL driver for C++ offers an easy to use API derived from JDBC
4.0. MySQL Workbench has used it successfully for years.

We have improved the driver since the last GA release. Please see the
documentation and the CHANGES file in the source distribution for a
detailed description of bugs that have been fixed. Bug descriptions are
also listed below.

Enjoy!

======================================================================

Changes in MySQL Connector/C++ 1.1.8 (2016-12-16, General
Availability)

Security Notes

* OpenSSL is ending support for version 1.0.1 in December
2016; see
https://www.openssl.org/policies/releasestrat.html.
Consequently, Connector/C++ Commercial builds now use
version 1.0.2 rather than version 1.0.1, and the linked
OpenSSL library for the Connector/C++ Commercial has been
updated from version 1.0.1 to version 1.0.2j. For a
description of issues fixed in this version, see
https://www.openssl.org/news/vulnerabilities.html.
This change does not affect Oracle-produced MySQL
Community builds of Connector/C++, which use the yaSSL
library instead.

Functionality Added or Changed

* Connector/C++ now supports a OPT_TLS_VERSION connection
option for specifying the protocols permitted for
encrypted connections. The option value is string
containing a comma-separated list of one or more protocol
names. Example:
connection_properties[“OPT_TLS_VERSION”] = sql::SQLString(“TLSv1.1,TLS
v1.2”);

The permitted values depend on the SSL library used to
compile MySQL: TLSv1, TLSv1.1, TLSv1.2 if OpenSSL was
used; TLSv1 and TLSv1.1 if yaSSL was used. The default is
to permit all available protocols.
For more information about connection protocols in MySQL,
see Secure Connection Protocols and Ciphers
(http://dev.mysql.com/doc/refman/5.7/en/secure-connection-protocols-ciphers.html). (Bug #23496967)

* Connector/C++ now supports a OPT_SSL_MODE connection
option for specifying the security state of the
connection to the server. Permitted option values are
SSL_MODE_PREFERRED (the default), SSL_MODE_DISABLED,
SSL_MODE_REQUIRED, SSL_MODE_VERIFY_CA, and
SSL_MODE_VERIFY_IDENTITY. These values correspond to the
values of the –ssl-mode option supported by MySQL client
programs; see Command Options for Secure Connections
(http://dev.mysql.com/doc/refman/5.7/en/secure-connection-options.html).
For example, this setting specifies that
the connection should be unencrypted:
connection_properties[“OPT_SSL_MODE”] = sql::SSL_MODE_DISABLED;

The OPT_SSL_MODE option comprises the capabilities of the
sslEnforce and sslVerify connection options.
Consequently, both of those options are now deprecated.
(Bug #23496952)

* Connector/C++ now supports OPT_MAX_ALLOWED_PACKET and
OPT_NET_BUFFER_LENGTH connection options. Each option
takes a numeric value. They correspond to the
MYSQL_OPT_MAX_ALLOWED_PACKET and
MYSQL_OPT_NET_BUFFER_LENGTH options for the
mysql_options() C API function.

* Issues compiling Connector/C++ under Visual Studio 2015
were corrected.

Bugs Fixed

* A segmentation fault could occur for attempts to insert a
large string using a prepared statement. (Bug #23212333,
Bug #81213)

* The certification verification checks that are enabled by
the verifySSL connection option were not performed
properly. (Bug #22931974)

* Connector/C++ failed to compile against a version of the
MySQL C API older than 5.7. (Bug #22838573, Bug #80539,
Bug #25201287)

On Behalf of the MySQL/ORACLE RE Team
Daniel Horecki

MySQL Connector/C++ 2.0.3 m3 Development Release has been released

MySQL Connector/C++ 2.0.3 is the next development milestone of the MySQL Connector/C++ 2.0 series, and the first public release. Apart from covering more X DevAPI features, it adds a new, plain C API, called XAPI, that offers functionality similar to X DevAPI to applications written in plain C. Thus, not only can MySQL Connector/C++ be used to write C++ applications, as before.

Now, using the XAPI, MySQL Connector/C++ can be used to write plain C applications to access MySQL Database implementing a document store as well as execute traditional plain SQL statements. For more information about XAPI, refer to the documentation at http://dev.mysql.com/doc/dev/connector-cpp/xapi_ref.html.

To learn more about how to write applications using the X DevAPI, see X DevAPI User Guide (http://dev.mysql.com/doc/x-devapi-userguide/en/). For more information about how to use Connector/C++ 2.0 and how the X DevAPI is implemented in it, see http://dev.mysql.com/doc/dev/connector-cpp/.

Note

The X DevAPI requires at least MySQL Server version 5.7.12 or higher with the X Plugin enabled. For general documentation about how to get started using MySQL as a document store, see Using MySQL as a Document Store (http://dev.mysql.com/doc/refman/5.7/en/document-store.html).

To download MySQL Connector/C++ 2.0.3 m3, see the “Development Releases” tab at http://dev.mysql.com/downloads/connector/cpp/

X DevAPI Notes

New X DevAPI features added in this MySQL Connector/C++ release:

  • Methods for starting and controlling transactions
  • Using an X DevAPI URI or connection string to specify new session parameters
  • Capability of binding a session to the default shard and execute SQL statements there (using XSession.bindToDefaultShard())
  • Methods for counting elements in a table or collection
  • Access to multiple result sets if present in a query result
  • Methods to count items in a result set and fetch a complete result set at once (using fetchAll()), instead of accessing items one by one (using fetchOne())
  • Access to warnings reported when processing a statement (getWarnings())
  • Access to information about affected rows, generated auto-increment values, and identifiers of documents added to a collection

On Behalf of the MySQL/ORACLE RE Team