MySQL Connectors and other MySQL client tools and applications now synchronize the first digit of their version number with the (latest) MySQL server version they support. For example, MySQL Connector/C++ 8.0.12 would be designed to support all features of MySQL server version 8 (or earlier). This change makes it easy and intuitive to decide which client version to use for which server version.
Connector/C++ 8.0.5 is the first release to use the new numbering. It is the successor to Connector/C++ 2.0.4.
-
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
, andascii
). 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. (WL #10769)
The
NodeSession
class has been renamed toSession
, and theXSession
class has been removed. (WL #10785)
-
For X DevAPI or X DevAPI for C applications, 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 in the 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" });
X DevAPI for C 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 );
(WL #9978)
The
SqlResult
class now implements thegetAffectedRowsCount()
andgetAutoIncrementValue()
X DevAPI methods. (Bug #25643081)To avoid unintentional changes to all items in a collection, the
Collection::modify()
andCollection::remove()
methods now require a nonempty selection expression as argument. (WL #10786)Connections created using
Session
objects now are encrypted by default. Also, thessl-enabled
connection option has been replaced byssl-mode
. Permittedssl-mode
values aredisabled
,required
(the default),verify_ca
andverify_identity
. (WL #10442)Option names within connection strings are now treated as case insensitive. Option values are still case sensitive by default. (WL #10717)
It is now possible to call
stmt.execute()
multiple times. Calling methods that modify statement parameters should modify the statement sent withexecute()
. 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)