Using MySQL Connector/Python 8.0 with MySQL 8.0

The MySQL Connector/Python Team is pleased to announce MySQL Connector/Python 8.0.11, the first GA 8.0 release series of the official MySQL driver for Python. This release introduces the first Python driver that adds full MySQL 8.0 support.

Document Store

MySQL 8.0 includes many improvements and new features, with Document Store being the biggest.

MySQL Document Store is schema-less with a flexible data structure storage system for documents. This removes the requirement for schema design, normalization, foreign keys, constrains, and data types.

The Document Store is accessible by the X DevAPI, an API that introduces a new modern and easy-to-learn way to work with your data that is implemented by all MySQL Connectors that support the X Protocol, such as MySQL Connector/Python.

Getting Started

Installation

Requirements:

The recommended way to install Connector/Python is via pip.

Packages are also available from the MySQL Connector/Python downloads site. For some packaging formats, there are different packages for different versions of Python. Choose the one appropriate for the version of Python installed on your system.

For installation documentation, please visit the Connector/Python installation guide.

Writing your first program using the MySQL Document Store

Assuming Connector/Python 8.0 is installed on your system and you’re accessing a MySQL 8.0 server, you’re ready to write your first program using the MySQL Document Store.

For a detailed explanation of this code, please visit the Getting Started section of the official MySQL Connector/Python X DevAPI Reference Documentation.

Improved Security

Server TCP connections are now secure by default, meaning the default SSL Mode is now set to REQUIRED (mysqlx.SSLMode.REQUIRED).
Support was also added for the latest secure MySQL 8 authentication plugins based on SHA-256 hashing, such as new the caching_sha2_password authentication plugin. Usage can be implicit or explicit, for example:

Fluent API

The X DevAPI operations are structured to be “fluent”. This means it’s possible to call multiple methods to modify an object prior to execution, which enables a fluent query builder and allows more readable, maintainable, and secure code.

An example is following where where() and sort() are fluent methods to modify the find operation prior to executing it.

Support for raw SQL statements

The X DevAPI allows you to execute raw SQL statements to combine the flexibility of the document store model with the power of the relational model.

Transactions, Savepoints and Row Locking

Connector/Python provides an API to create, commit, or rollback a transaction, and also to create, release, or rollback to an intermediate savepoint within that transaction.

An optional savepoint name can be defined to create a transaction savepoint, which can later be used to rollback.

If a savepoint name is not provided, then mysqlx.Session.release_savepoint() will return a generated savepoint name.

To learn more about writing applications using the MySQL X DevAPI with Connector/Python and other MySQL connectors and clients, see http://dev.mysql.com/doc/x-devapi-userguide/en/

For general documentation about how to get started using MySQL as a document store, see https://dev.mysql.com/doc/refman/8.0/en/document-store.html

For more information about how the X DevAPI is implemented in MySQL Connector/Python, and its usage, see https://dev.mysql.com/doc/dev/connector-python/8.0/

We welcome and appreciate your feedback and bug reports: http://bugs.mysql.com/

Enjoy!

What is new in Connector/C++ 8.0

We are proud to announce that with version 8.0.11 the new MySQL Connector/C++ 8.0 series becomes GA! Connector/C++ 8.0 is your gateway to the new exciting features of MySQL Server 8.0 such as MySQL Document Store. It also lets you perform your usual database tasks in a simpler and more powerful way using new, modern APIs that bring to you the full advantage of modern C++ programming language.

The 8.0 series is a true milestone in the development of Connector/C++. We have not only added new APIs but also completely re-implemented the connector to create good foundation for future innovation and improvements.The new implementation of Connector/C++ is based entirely on the new X Protocol of MySQL Server 8.0 and is highly modular to allow rapid development of new features. For the first time we aligned our APIs with other MySQL connectors. Also, for the first time Connector/C++ is offering a plain C API for code written in C.

New APIs of Connector/C++ 8.0

Up to now Connector/C++ implemented a single API based on JDBC4 standard. While keeping the old API for backward compatibility, the 8.0 series introduces two new APIs that can be used for accessing MySQL database.

  • X DevAPI: a C++ implementation of the new, fluent CRUD API defined for accessing MySQL Document Store and relational data. The same API is also implemented by xshell and other connectors and provides a uniform interface to the MySQL database.
  • XAPI: a new plain C API with functionality similar to that of X DevAPI. This API allows applications written in plain C to have access to the new MySQL features such as Document Store (it might feel strange to have plain C API in a C++ connector but in fact plain C can be seen as a subset of the C++ language; also, placing both APIs in the same connector allows re-using common implementation components).

To give you a feeling of the new APIs, here is a sample code which opens a session, creates a document collection, adds a document to that collection and then lists documents in the collection.

The same thing implemented in plain C, using XAPI, looks as follows (for simplicity, error handling logic is omitted).

Note that the choice of the API is done by including appropriate public header: either <mysqlx/xdevapi.h> or <mysqlx/xapi.h>.

Apart from a CRUD style interface for accessing the MySQL Document Store, which is shared with other MySQL connectors, the new APIs give you full access to SQL and relational data, including transactions, parameter binding, row locking, convenient classes for representing query results and more. For example, the following code shows how to execute a plain SQL query against a relational table using X DevAPI. Similar code can be written using XAPI.

The new APIs can be used as a modern replacement for the previous, JDBC based API of Connector/C++ 1.1 and for the CAPI of the MySQL client library. The X DevAPI brings the advantage and power of modern C++ programming with support for language constructs such as iterators, range loops, method chaining, RAII, overloaded operators, custom type conversions etc. The plain C XAPI is also a major re-design of the traditional MySQL CAPI with automatic memory management, better separation of public interface from internal implementation and with functions for accessing the MySQL Document Store. Note however that these new APIs are implemented over X Protocol and for that reason they will not work with older versions of MySQL Server.

For more information check available documentation on MySQL Document Store and X DevAPI User Guide. See also reference documentation for the Connector/C++ implementation of X DevAPI and XAPI reference documentation.

Getting started with Connector/C++ 8.0

Installing Connector/C++ 8.0

To develop applications that use Connector/C++ 8.0 you need the following files

  • Public headers containing declarations for the APIs implemented by the connector.
  • Connector libraries that contain implementation of the APIs. There are actually two libraries shipped with Connector/C++ 8.0 – the main library with base name mysqlcppconn8, implementing the new APIs (X DevAPI and XAPI), and a legacy library with base name mysqlcppconn which is a drop-in replacement for the 1.1 connector library. Both static and shared variants of each library are shipped.

These files are distributed as TGZ or ZIP packages that you can unpack to the location of your choice. There are several options for how to use the connector during compile time and at run-time, all depending on the platform you are working on and whether you want to install connector locally or system-wide. Below is some basic information to get you started. For more details see usage instructions in the reference manual.

Building code which uses Connector/C++ 8.0

Building code that uses Connector/C++ requires correctly setting include path, so that connector’s public headers can be found by the compiler, and passing connector library to the linker invocation. Assuming that Connector/C++ was installed under $MYSQL_CPPCONN_DIR the include path should be set to $MYSQL_CPPCONN_DIR/include (for gcc use -I option, for MSVC the C/C++ > Additional Include Directories  project setting). After that X DevAPI or XAPI declarations can be loaded using #include <mysqlx/xdevapi.h> or #include <mysqlx/xapi.h> directive, respectively.

Note: The X DevAPI uses C++11 language features. For some compilers C++11 must be explicitly enabled. For example gcc needs option -std=c++11 to understand C++11. This is not required for MSVC nor for XAPI code (which is plain C)

Depending on the platform, the shared Connector/C++ library is named:

  • libmysqlcppconn8.so on Unix platforms (soname libmysqlcppconn8.so.1)
  • libmysqlcppconn8.dylib on the OSX platform (link name libmysqlcppconn8.1.dylib)
  • mysqlcppconn8-1-vs14.dll on Windows platforms (with import library vs14/mysqlcppconn8.lib)

You need to add this library to your compiler/linker invocation when building code that uses the connector  (for gcc add -lmysqlcppconn8 to the linker options, for MSVC add vs14/mysqlcppconn8.lib to Linker > Input > Additional Dependencies  setting of your project). You also need to specify path where the connector library can be found (for gcc use -L option, for MSVC Linker > Additional Library Directories  setting). Assuming that Connector/C++ was installed under $MYSQL_CONCPP_DIR the libraries can be found under $MYSQL_CONCPP_DIR/lib on 32-bit platforms and $MYSQL_CONCPP_DIR/lib64 on 64-bit platforms.

Example gcc invocation for building application with sources in app.cc might look as follows (assuming that environment variable MYSQL_CONCPP_DIR is set to the location where Connector/C++ was installed)

Due to ABI incompatiblities between different compiler versions, the code that uses Connector/C++ libraries should be built with the same compiler version as the connector itself. The information about compiler version used to build connector libraries can be found inside BUILDINFO.txt file distributed with the connector. In principle a different version of the compiler can be used provided that it is ABI compatible, but it is difficult to determine what versions of the compiler are ABI compatible with each other.

Running code which uses Connector/C++ 8.0

Code built against Connector/C++ depends on the shared connector library which must be found at run-time by the dynamic linker. It also requires OpenSSL libraries that are used by Connector/C++.  Here are example run-time dependencies shown by ldd for an application built with Connector/C++.

To be able to run such an application the dynamic linker must be able to find the connector library in its predefined locations. The easiest way of arranging this is to copy the shared connector library to the location of the executable. This method works for any operating system. Otherwise the exact way of registering Connector/C++ libraries with the dynamic linker depends on the operating system.

Note: For platforms such as Windows, that normally do not have OpenSSL libraries available, Connector/C++ packages include these libraries. Putting these libraries next to the connector ones usually ensures that the dynamic linker can find them at run-time.

Note: On Windows the executable will depend on the MSVC 2015 runtime DLLs, that need to be installed on the target system.

Note: Connector/C++ also ships static libraries that can be used to build applications that do not require shared connector libraries to be present on the target system. However, an application linked statically with Connector/C++ will still depend on shared OpenSSL libraries and on MSVC runtime in case of Windows.

In summary

MySQL 8 brings a lot of new, exciting features which allow you to work with your data in new ways, going beyond the traditional SQL paradigm. Connector/C++ 8.0 is a part of this story and it also invites you to exploring new ways of working with MySQL from your C++ or C code. It is a result of a long effort and we are eager to hear about your impressions of the new features we brought to you. Happy coding!

MySQL Connector/C++ 8.0.11 GA has been released

Dear MySQL users,

MySQL Connector/C++ 8.0.11 is the first GA 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++ 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
For X DevAPI or XAPI applications, Connector/C++ 8.0 requires
MySQL Server 5.7.12 or higher with X Plugin enabled. For
applications that use the legacy JDBC API, Connector/C++ 8.0
can use MySQL Server 5.5 or higher, and X Plugin is not required.

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

To download MySQL Connector/C++ 8.0.11, see the
“Generally Available(GA) Releases” tab at

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


Changes in MySQL Connector/C++ 8.0.11 (2018-04-19,
General Availability)

For MySQL Connector/C++ 8.0.11 and higher, Commercial and
Community distributions require the Visual C++
Redistributable for Visual Studio 2015 to work on Windows
platforms. The Redistributable is available at the Microsoft
Download Center
(http://www.microsoft.com/en-us/download/default.aspx);
install it before installing Connector/C++.

Functionality Added or Changed

* Incompatible Change: When documents without an _id
attribute are added to a collection, the server now
automatically generates IDs for them. The server
determines the ID format, which should be considered
opaque from the API perspective (they are no longer
UUID-based). As before, no _id attribute is generated if
a document already contains one. User-provided document
IDs must not conflict with IDs of other documents in the
collection.
This capability requires a MySQL 8.0 GA server. If the
server does not support document ID generation, the
document-add operation returns an error indicating that
document IDs were missing.
For X DevAPI, the generated IDs resulting from a
document-add operation can be obtained using the new
Result.getGeneratedIds() method, which returns a list.
For XAPI, the generated IDs can be obtained using the new
mysqlx_fetch_generated_id() function, which returns IDs
one by one for successive calls, until it returns NULL to
indicate no more generated IDs are available. For both X
DevAPI and XAPI, document IDs specified explicitly in
added documents are not returned.
Incompatibility: The getGeneratedIds() method replaces
getDocumentId() and getDocumentIds(), which are now
removed. The mysqlx_fetch_generated_id() function
replaces mysqlx_fetch_doc_id(), which is now removed.

* A patch operation has been implemented that enables
specifying a JSON-like object that describes the changes
to apply to documents in a collection.
For X DevAPI, the CollectionModify operation supports a
new patch() clause for patching documents. For XAPI,
there are two new functions:
mysqlx_collection_modify_patch() directly executes
patching on documents in a collection that satisfy given
criteria. mysqlx_set_modify_patch() adds a patch
operation to a modify statement created with the
mysql_collection_modify_new() function.

* For connections to the server made using the legacy JDBC
API (that is, not made using X DevAPI or XAPI),
Connector/C++ 8.0 now supports an
OPT_GET_SERVER_PUBLIC_KEY connection option that enables
requesting the RSA public key from the server. For
accounts that use the caching_sha2_password or
sha256_password authentication plugin, this key can be
used during the connection process for RSA key-pair based
password exchange with TLS disabled. This capability
requires a MySQL 8.0 GA server, and is supported only for
Connector/C++ built using OpenSSL.

Bugs Fixed

* Single-document methods such as Collection.replaceOne()
did not accept expr() as the document specification, but
instead treated it as a plain JSON string. (Bug
#27677910)

* Compiling X DevAPI and XAPI test programs failed with an
error. (Bug #27610760)

* Connecting with an incorrect SSL_CA value could result in
a memory leak. (Bug #27434254)

* For debug builds, specifying a document as _id raised an
assertion rather than producing an error. (Bug #27433969)

As always, a big THANK YOU for using MySQL!

MySQL Connector/C++ 8.0.7-rc has been released

Dear MySQL users,

MySQL Connector/C++ 8.0.7-rc is the release candidate (RC)
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++ 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 8.0 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.7-rc, see the “Development Releases”
tab at

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



Changes in MySQL Connector/C++ 8.0.7 (2018-02-26, Release
Candidate)

In addition to the new APIs introduced in MySQL Connector/C++
8.0 (X DevAPI and XAPI), Connector/C++ now also supports the
legacy API based on JDBC4. Applications written against the
JDBC4-based API of Connector/C++ 1.1 can be also compiled
with Connector/C++ 8.0, which is backward compatible with the
earlier version. Such code does not require the X Plugin and
can communicate with older versions of the MySQL Server using
the legacy protocol. This contrasts with X DevAPI and XAPI
applications, which expect MySQL Server 8.0.

The legacy API is implemented as a separate library with base
name mysqlcppconn as opposed to mysqlcppconn8 library
implementing the new APIs. For information about using the
legacy API, refer to the documentation at
http://dev.mysql.com/doc/connector-cpp/en/connector-cpp-getting-started-examples.html.

* Deprecation and Removal Notes

* Security Notes

* X DevAPI and XAPI Notes

* Functionality Added or Changed

* Bugs Fixed

Deprecation and Removal Notes

* View and table DDL methods have been removed. It is
preferable that SQL statements be used for such
operations.
Removed X DevAPI methods:
Schema.createView()
Schema.alterView()
Schema.dropView()
Schema.dropTable()

Removed X DevAPI data types:
Algorithm
CheckOption
SQLSecurity

Removed XAPI functions:
mysqlx_view_create
mysqlx_view_create_new
mysqlx_view_modify
mysqlx_view_modify_new
mysqlx_view_replace
mysqlx_view_replace_new
mysqlx_view_drop
mysqlx_table_drop
mysqlx_set_view_algorithm
mysqlx_set_view_security
mysqlx_set_view_definer
mysqlx_set_view_check_option
mysqlx_set_view_columns

Removed XAPI enumerations:
mysqlx_view_algorithm_t
mysqlx_view_security_t
mysqlx_view_check_option_t

Removed XAPI macros:
VIEW_ALGORITHM()
VIEW_SECURITY()
VIEW_DEFINER()
VIEW_CHECK_OPTION()
VIEW_COLUMNS()
VIEW_OPTION_XXX

Security Notes

* MySQL Connector/C++ now supports the
caching_sha2_password authentication plugin introduced in
MySQL 8.0 (see Caching SHA-2 Pluggable Authentication
(http://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html)),
with these limitations:

+ For applications that use X DevAPI or XAPI, only
encrypted (SSL) connections can be used to connect
to cached_sha2_password accounts. For non-SSL
connections, it is not possible to use
cached_sha2_password accounts.

+ For applications that use the legacy protocol, it is
not possible to make connections to
cached_sha2_password accounts in the following
scenario:
o The connection is unencrypted (OPT_SSL_MODE is
set to SSL_MODE_DISABLED).
o The server public key is given using the
"rsaKey" option and no RSA key exchange is used
(OPT_GET_SERVER_PUBLIC_KEY is set to false).
If RSA key exchange is enabled, the connection
works.

X DevAPI and XAPI Notes

* It is now possible to use the Collection interface to
create and drop indexes on document collections.
X DevAPI example:
coll.createIndex("idx",
R"({
"fields": [
{ "field": "$.zip", "type": "TEXT(10)" },
{ "field": "$.count", "type": "INT UNSIGNED" }
]
})"
);

coll.createIndex("loc",
R"({
"type": "SPATIAL",
"fields": [ { "field": "$.coords", "type": "GEOJSON", "srid": 3128
7 } ]
})"
);

coll.dropIndex("idx");

XAPI example:
ret = mysqlx_collection_create_index(coll, "idx",
R"({
"fields": [
{ "field": "$.zip", "type": "TEXT(10)" },
{ "field": "$.count", "type": "INT UNSIGNED" }
]
})"
)

ret = mysqlx_collecton_create_index(coll, "loc",
R"({
"type": "SPATIAL",
"fields": [ { "field": "$.coords", "type": "GEOJSON", "srid": 3128
7 } ]
})"
);

mysqlx_collection_drop_index(coll, "idx");


* It is now possible to use the Session interface to create
savepoints inside transactions and roll back a
transaction to a given savepoint. This interface supports
the operations provided by the SAVEPOINT, ROLLBACK TO
SAVEPOINT, and RELEASE SAVEPOINT statements. For more
information about these statements, see SAVEPOINT,
ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT Syntax
(http://dev.mysql.com/doc/refman/8.0/en/savepoint.html).
X DevAPI example:
sess.startTransaction();
string point1 = sess.setSavepoint();
sess.setSavepoint("point2");
sess.rollbackTo(point1);         // this also removes savepoint "point
2"
string point3 = sess.setSavepoint();
sess.releaseSavepoint(point3);  // explicitly remove savepoint
sess.commitTransaction();

XAPI example:
mysqlx_trasaction_begin(sess);
const char *point1 = mysqlx_savepoint_set(sess,NULL);
mysqlx_savepoint_set(sess,"point2");
mysqlx_rollback_to(sess,point1);
const char *point3 = mysqlx_savepoint_set(sess,NULL);
mysqlx_sevepoint_release(sess,point3);
mysqlx_transaction_commit(sess);

Functionality Added or Changed

* MySQL Connector/C++ now implements TLS connections using
the OpenSSL library. It is possible to build
Connector/C++ with OpenSSL or the bundled yaSSL
implementation of TLS. This is controlled by the WITH_SSL
CMake option, which takes these values: bundled (build
using bundled yaSSL code); system (build using system
OpenSSL library, with the location as detected by CMake);
path_name (build using OpenSSL library installed at the
named location). For more information, see
http://dev.mysql.com/doc/dev/connector-cpp/8.0/building.html

Bugs Fixed

* replaceOne() and similar methods did not correctly detect
document ID mismatches. (Bug #27246854)

* Calling bind() twice on the same parameter for complex
types resulted in empty values. (Bug #26962725)

On Behalf of the MySQL/Oracle Release Engineering Team,
Daniel Horecki

MySQL Connector/Python 8.0.6-rc has been released

Dear MySQL users,

MySQL Connector/Python 8.0.6-rc is the first release candidate version
of the MySQL Connector Python 8.0 series. This series adds support for
the new X DevAPI. The X DevAPI enables application developers to write
code that combines the strengths of the relational and document models
using a modern, NoSQL-like syntax that does not assume previous
experience writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see
http://dev.mysql.com/doc/x-devapi-userguide/en/. For more information
about how the X DevAPI is implemented in MySQL Connector/Python, and its
usage, see http://dev.mysql.com/doc/dev/connector-python.

Please note that the X DevAPI requires 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
http://dev.mysql.com/doc/refman/5.7/en/document-store.html.

To download MySQL Connector/Python 8.0.6-rc, see the “Development
Releases” tab at http://dev.mysql.com/downloads/connector/python/

Enjoy!

Changes in MySQL Connector/Python 8.0.6 (2018-02-01, Release
Candidate)

Functionality Added or Changed

* A new bdist_wheel distutils command was added to build a
Connector/Python wheel package.
A new –static option was added that enables static
linking for the C extension variant.

* X DevAPI: In the process of refining the definition of
the X DevAPI to cover the most relevant usage scenarios,
the following API components have been removed from the X
DevAPI implementation for Connector/Python:

+ API components that support session configurations.
The mysqlx.config namespace and all members of the
namespace.

+ The create_table, drop_table, create_view,
drop_view, and alter_view methods from the Schema
class.

* A Pylint test was added for the mysqlx module.

* A new Modify.patch() method was added to the X DevAPI as
a way to change several document attributes in one
operation; otherwise known as a JSON Merge Patch via RFC
7386.

* The create_index() method was added to the Collection
API.

* The transaction API was extended to allow setting
savepoints. The following methods have been added to the
Session object:

+ set_savepoint([name]): executes the SAVEPOINT name
SQL statement to generate a savepoint. If a name is
not provided (or None), one is generated.
The SAVEPOINT statement sets a named transaction
savepoint with a name of identifier. If the current
transaction has a savepoint with the same name, the
old savepoint is deleted and a new one is set.

+ release_savepoint(name): executes the RELEASE name
SQL statement to release a savepoint.
The RELEASE SAVEPOINT statement removes the named
savepoint from the set of savepoints of the current
transaction. No commit or rollback occurs. It
returns an error if the savepoint does not exist.

+ rollback_to(name): executes the ROLLBACK TO name SQL
statement to rollback a savepoint.
The ROLLBACK TO identifier command reverts the state
of the transaction back to what was when executed
the command SAVEPOINT identifier.
Names passed to these functions are checked to make sure
that the name is not null or an empty string. Names such
as ”, “”, , and so on, are not allowed even though
they are allowed by the server. For more information, see
SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT
Syntax
(http://dev.mysql.com/doc/refman/5.7/en/savepoint.html).

Bugs Fixed

* On Enterprise Linux 7, SSL connections could fail due to
the Python 2.7.9 or higher requirement. Since EL7
backported the SSL module from Python 3 (PEP466) into its
default Python 2.7.5, SSL connections are now enabled on
EL7. (Bug #27368032)

* MySQL Server 8.0 utf8mb4 collations were missing from
Connector/Python. (Bug #27277964)

* The LICENSE and README files were missing from the C
extension ( “cext”) builds. (Bug #26912787)

* Python 3.6 is now officially supported and tested.

On Behalf of Oracle/MySQL Release Engineering Team
Prashant Tekriwal

MySQL Connector/Java 8.0.9-rc has been released

Dear MySQL users,

MySQL Connector/Java 8.0.9-rc is the first Release Candidate
of the 8.0 branch of MySQL Connector/J, providing an insight into
upcoming features. It is suitable for use with MySQL Server versions
5.5, 5.6, 5.7, and 8.0. It supports the Java Database Connectivity
(JDBC) 4.2 API.

This release includes the following new features and changes, also
described in more detail on

https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-9.html

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.
This change makes it easy and intuitive to decide which client version
to use for which server version.

As always, we recommend that you check the “CHANGES” file in the download
archive to be aware of changes in behavior that might affect your application.

To download MySQL Connector/Java 8.0.9-rc, see the “Development
Releases” tab at http://dev.mysql.com/downloads/connector/j/

Enjoy!

Changes in MySQL Connector/J 8.0.9 (2018-01-30, Release
Candidate)

Functionality Added or Changed

* X DevAPI: In the process of refining the definition of
the X DevAPI to cover the most relevant usage scenarios,
the following API components have been removed from the X
DevAPI implementation for Connector/J:

+ Components that support DDLs for views, including
the createView(), dropView(), and modifyView()
methods.

+ Components that support DDLS for tables, including
the createTable(), dropTable(), and modifyTable()
methods.

+ Components that support session configurations,
including the SessionConfig object, the
PersistenceHandler interface, the PasswordHandler
interface, and the SessionConfigManager class.

* X DevAPI: Added the setSavepoint(), rollbackTo(), and
releaseSavepoint() methods to the Session interface to
support the SAVEPOINT
(http://dev.mysql.com/doc/refman/8.0/en/savepoint.html),
ROLLBACK TO SAVEPOINT
(http://dev.mysql.com/doc/refman/8.0/en/savepoint.html),
and RELEASE SAVEPOINT
(http://dev.mysql.com/doc/refman/8.0/en/savepoint.html)
statements. See MySQL Connector/J X DevAPI Reference
(http://dev.mysql.com/doc/dev/connector-j) for more
details.

* X DevAPI: A new patch() function has been added to the
ModifyStatement interface. The function accepts an
JSON-like object describing document changes and applies
them to documents matched by the modify() filter. See
MySQL Connector/J X DevAPI Reference
(http://dev.mysql.com/doc/dev/connector-j) for more
details.

* X DevAPI: The createIndex() method for the Collection
interface now has a new syntax. See MySQL Connector/J X
DevAPI Reference
(http://dev.mysql.com/doc/dev/connector-j) for more
details.

* X DevAPI: Added the following methods for single-document
operations in the X DevAPI:

+ replaceOne()

+ addOrReplaceOne()

+ getOne()

+ removeOne()
See MySQL Connector/J X DevAPI Reference
(http://dev.mysql.com/doc/dev/connector-j) for more
details.

* X DevAPI: Setters and getters methods have been added for
the configuration properties with the MysqlDataSource,
MysqlXADataSource, and MysqlConnectionPoolDataSource
classes.

* X DevAPI: The connection property enabledTLSProtocols can
now be used to select the allowed TLS versions for an X
Protocol connection to the server.

* Connector/J now supports the new caching_sha2_password
authentication plugin, which is the default
authentication plugin for MySQL 8.0.4 and later (see
Caching SHA-2 Pluggable Authentication
(http://dev.mysql.com/doc/refman/8.0/en/caching-sha2-plug
gable-authentication.html) for details).
Note
To authenticate accounts with the caching_sha2_password
plugin, either a secure connection to the server using
SSL
(http://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-using-ssl.html)
or an unencrypted connection that supports password exchange
using an RSA key pair (enabled by setting one or both of the
connecting properties allowPublicKeyRetrieval and
serverRSAPublicKeyFile) must be used.
Because earlier versions of Connector/J 8.0 do not
support the caching_sha2_password authentication plugin
and therefore will not be able to connect to accounts
that authenticate with the new plugin (which might
include the root account created by default during a new
installation of a MySQL 8.0 Server), it is highly
recommended that you upgrade now to Connector/J 8.0.9, to
help ensure that your applications continue to work
smoothly with the latest MySQL 8.0 Server.

* Connector/J now takes advantage of the MySQL Server 8.0
data dictionary by making the connection property
useInformationSchema true by default; this makes
Connector/J, by default, access the data dictionary more
efficiently by querying tables in the INFORMATION_SCHEME.
See INFORMATION_SCHEMA and Data Dictionary Integration
(http://dev.mysql.com/doc/refman/8.0/en/data-dictionary-information-schema.html)
for details. Users can still set useInformationSchema to false,
but for MySQL 8.0.3 and later, some data dictionary queries might
then fail, due to deprecations of older data dictionary features.

* In the past, query texts were always passed as strings to
QueryInterceptor methods, even if the texts were not
actually used by them. Now, only suppliers for the texts
are passed, and the texts are only extracted by get()
calls on the suppliers.

Bugs Fixed

* The connection property nullNamePatternMatchesAll, when
set to false (which was the default value), caused some
DatabaseMetaData methods to throw an error when a null
search string was used with them. The behavior was not
compliant with the JDBC specification, which requires
that a search criterion be ignored when a null search
string is used for it. The connection property has now
been removed from Connector/J 8.0. (Bug #26846249, Bug
#87826)

* Trying to print the query in a PreparedStatement using
the toString() method after it has been closed resulted
in an exception (No operations allowed after statement
closed) being thrown. (Bug #26748909)

* When working with MySQL Server 8.0, an update or delete
statement for a CONCUR_UPDATABLE ResultSet failed when
the ResultSet’s primary keys included a boolean column
and the character set used was not latin1. (Bug
#26266731)

* Connector/J failed to recognize a server greeting error
it received during a handshake with the server and parsed
the error message as a normal greeting packet, causing an
ArrayIndexOutOfBoundsException to be thrown. (Bug
#24924097)

On Behalf of the MySQL/Oracle Release Engineering Team,
Hery Ramilison

MySQL Connector/ODBC 5.3.10 has been released

MySQL Connector/ODBC 5.3.10, a new version of the ODBC driver for the MySQL database management system, has been released.

The available downloads include both a Unicode driver and an ANSI driver based on the same modern codebase. Please select the driver type you need based on the type of your application – Unicode or ANSI. Server-side prepared statements are enabled by default. It is suitable for use with any MySQL version from 5.5.

This is the fifth release of the MySQL ODBC driver conforming to the ODBC 3.8 specification. It contains implementations of key 3.8 features, including self-identification as a ODBC 3.8 driver, streaming of output parameters (supported for binary types only), and support of the SQL_ATTR_RESET_CONNECTION connection attribute (for the Unicode driver only).

Also, Connector/ODBC 5.3 introduces a GTK+-based setup library providing a GUI DSN setup dialog on some Unix-based systems, currently included in the Debian 7/8/9, EL6/OL6, EL7/OL7 (64-bit only), Fedora 24/25/26, FreeBSD 10/11, SLES 12, Ubuntu 14/16/17 packages. Other new features in the 5.3 driver are FileDSN and Bookmarks support.

The release is now available in source and binary form for a number of platforms from our download pages at

http://dev.mysql.com/downloads/connector/odbc/5.3.html

For information on installing, please see the documentation at

http://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation.html

Functionality Added or Changed

Bugs Fixed

  • Fixed an OpenRecordSet memory leak due to get_session_variable() not freeing a result for errors. (Bug #27155880, Bug #88143
  • Calling MySQLDriverConnect with the pcbConnStrOut argument set to NULL caused an unexpected failure. (Bug #27101767, Bug #88371)
  • Connector/ODBC now compiles on MySQL 5.5. Thanks to Vadim Zeitlin for the patch. (Bug #26633971, Bug #87413)

Enjoy and thanks for the support!

MySQL Connector/NET 6.9.11 GA has been released

Dear MySQL users,

MySQL Connector/NET 6.9.11 is a maintenance release for the 6.9.x series
of the .NET driver for MySQL. It can be used for production
environments.

It is appropriate for use with MySQL server versions 5.5-5.7.

It is now available in source and binary form from
http://dev.mysql.com/downloads/connector/net/#downloadsandmirrorsites
(note that not all mirror sites may be up to date at this point-if you
can’t find this version on some mirror, please try again later or choose
another download site.)

Changes in MySQL Connector/NET 6.9.11 (2018-01-26, General
Availability)

   Functionality Added or Changed

     * All demos, code samples, and test-debug scripts are now
       optional to install, whereas before these items were installed by
       default. (Bug #19248623)

   Bugs Fixed

     * Instances of the DataReader class did not close
       connections implicitly as expected when CommandBehavior was set
       to CloseConnection. This fix ensures that the connection is
       closed properly when the DataReader object no longer exists. (Bug
       #27277013)

     * When a decimal column was defined with a scale of zero,
       such as DECIMAL(8, 0), the value of the NumericPrecision field
       returned by the MySqlDataReader.GetSchemaTable method was lower
       by one. For example, it returned 7 instead of 8 as expected. (Bug
       #26954812, Bug #88058)

     * The data table returned by the
       MySqlDataReader.GetSchemaTable method had an inaccurate value of
       zero assigned to the ColumnSize field for LONGTEXT and LONGBLOB
       data types, and also indicated that the IsLong field value was
       false when it should have returned true. (Bug #26876592, Bug
       #87876)

     * The MySqlDataReader.GetSchemaTable method returned
       different column-size values when used with different character
       sets. (Bug #26876582, Bug #87868)

     * Support for making a secure connection to a server
       configured to use TLSv1.2 was limited by external factors. (Bug
       #25689154)

     * SSL connections made to a single MySQL instance could not
       be disconnected and created repeatedly without restarting the
       client application to clear the half-open sockets.  (Bug
       #20393654, Bug #75022)

The documentation is available at:
http://dev.mysql.com/doc/connector-net/en/

Nuget packages are available at:
https://www.nuget.org/packages/MySql.Data/6.9.11
https://www.nuget.org/packages/MySql.Data.Entity/6.9.11
https://www.nuget.org/packages/MySql.Fabric/6.9.11
https://www.nuget.org/packages/MySql.Web/6.9.11

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed

MySQL Connector/NET 6.10.6 GA has been released

Dear MySQL users,

MySQL Connector/NET 6.10.6 is the third GA release with .NET Core
now supporting various connection-string options.

To download MySQL Connector/NET 6.10.6 GA, see the “Generally Available
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/net/

Changes in MySQL Connector/NET 6.10.6 (2018-01-25, General
Availability)

   Functionality Added or Changed

     * The .NET Core 2.0 implementation now supports the
       following connection-string options: AutoEnlist,
       InteractiveSession, Logging, Replication, and UseUsageAdvisor.
       For more information about the options, see Connector/NET
       Connection-String Options Reference
       (http://dev.mysql.com/doc/connector-net/en/connector-net-
       connection-options.html). (Bug #27297337)

   Bugs Fixed

     * When a decimal column was defined with a scale of zero,
       such as DECIMAL(8, 0), the value of the NumericPrecision field
       returned by the MySqlDataReader.GetSchemaTable method was lower
       by one. For example, it returned 7 instead of 8 as expected. (Bug
       #26954812, Bug #88058)

     * The data table returned by the
       MySqlDataReader.GetSchemaTable method had an inaccurate value of
       zero assigned to the ColumnSize field for LONGTEXT and LONGBLOB
       data types, and also indicated that the IsLong field value was
       false when it should have returned true. (Bug #26876592, Bug
       #87876)

     * The MySqlDataReader.GetSchemaTable method returned
       different column-size values when used with different character
       sets. (Bug #26876582, Bug #87868)

     * Support for making a secure connection to a server
       configured to use TLSv1.2 was limited by external factors. (Bug
       #25689154)

     * SSL connections made to a single MySQL instance could not
       be disconnected and created repeatedly without restarting the
       client application to clear the half-open sockets. 
       (Bug #20393654, Bug #75022)

Nuget packages are available at:

https://www.nuget.org/packages/MySql.Data/6.10.6
https://www.nuget.org/packages/MySql.Web/6.10.6
https://www.nuget.org/packages/MySql.Data.Entity/6.10.6
https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/6.10.6
https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore.Design/6.10.6

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed

MySQL Connector/NET 6.10.5 GA has been released

Dear MySQL users,

MySQL Connector/Net 6.10.5 is the second GA release and the first to
introduce .NET Core 2.0 and Entity Framework Core 2.0 support.

To download MySQL Connector/Net 6.10.5 GA, see the “Generally Available
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/net/


Changes in MySQL Connector/Net 6.10.5 (2017-12-08, General
Availability)

   Functionality Added or Changed

     * Support for .NET Core 2.0 and .NET Standard 2.0 has been
       added (.NET Core 1.1 support continues). With .NET Core 2.0, most
       of the common ADO.NET classes are available for use, such as:

          + System.Data.DataTable, System.Data.DataColumn, and
            System.Data.DataRow

          + System.Data.DataSet

          + System.Data.Common.DataAdapter

     * Support for Entity Framework Core 2.0 has been added
       (Entity Framework 1.1 support continues). Currently, the MySQL
       Connector/Net implementation excludes the following 2.0 features:

          + Modeling: table splitting, owned types, model-level
            query filters, database scalar function mapping,
            self-contained type configuration for code first.

          + High performance: DbContext pooling and explicitly
            compiled queries.

          + Change tracking: attach can track a graph of new and
            existing entities.

          + Query: improved LINQ translation, group-join
            improvements, string interpolation in FromSql and
            ExecuteSqlCommand, new EF.Functions.Like().

          + Database management: pluralization hook for
            DbContext scaffolding.

          + Others: only one provider per model, consolidated
            logging and diagnostics.


Nuget packages are available at:

https://www.nuget.org/packages/MySql.Data/6.10.5
https://www.nuget.org/packages/MySql.Web/6.10.5
https://www.nuget.org/packages/MySql.Data.Entity/6.10.5
https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore/6.10.5
https://www.nuget.org/packages/MySql.Data.EntityFrameworkCore.Design/6.10.5

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed