MySQL Connector/J 5.1.40 has been released

I’m pleased to announce the newest MySQL Connector/J 5.1 Maintenance Release.

As usual, MySQL Connector/J 5.1 can be downloaded from the official distribution channels MySQL Downloads and The Central Repository. The commercially licensed version is available for download at My Oracle Support.

Please don’t forget to consult the CHANGES file in the download archive and/or the release notes page to know what is new and if there are any changes that might affect your applications.

MySQL Connector/J 5.1.40 is the official JDBC driver for MySQL databases and, as such, we are continuously working to make it better, more reliable and faster. This new version delivers several bug fixes and upgrades. This is the current recommend  version and you should upgrade to it as soon as possible.

I’d like to highlight the most relevant fixes and improvements in this release:

Recovered & new features

Previous versions used to silently disable local transaction states management (connection property useLocalTransactionState=true) when server side query cache was enable. This used to be workaround for a know server bug that it’s long time gone. The workaround in Connector/J side, though, survived till these days. I’m pretty sure that the effects will be almost unnoticed but certainly this helps empowering the developer and provides better control over the Connector.

The XA errors mapping in Connector/J was updated with the missing error codes that the server may throw back.

MySQL Fabric support issues

Connector/J 5.1 maintains support for MySQL Fabric, as such, this release comes with a couple fixes to it. Fabric connections are especially prone to problems as they rely on both a connection to a Fabric node and multiple connections to MySQL servers while having to be able to refresh themselves to topology changes, failures and such. A couple of issues caused by communication failures to the Fabric node are now fixed.

Continuous improvement of MySQL data types support

The JSON data type is relatively new in Connector/J. As such, every now and then there is something that needs to be fixed or adjusted. This time it was an encoding issue observed when the JSON strings contained non Latin characters. Additionally, the specific combination of updatable result sets with cursor based fetches was missing the support for the JSON type.

Getting data from BIT columns as numeric values was behaving inconsistently when binary values and ASCII values of numbers matched. As a result, instead of the expected value, it was occurring an extra conversion to String before the data was returned. Also fixed in this release.

Improved internals

Although we aim to, it’s almost impossible to guarantee that the code is free from memory leaks, deadlocks, NPEs and so on. A few of those where caused by some bugs that are now fixed.

Under certain situations the exception interceptor mechanism was being triggered twice. This, not only caused an unwanted additional  processing, but also was hiding the real cause that triggered the interceptor.

Client-side caching of prepared statements while using server-side prepared statements requires extra care because it can easily be a source of memory leaks, both on client and server sides. In this particular scenario, setting a statement as non-poolable was causing a never ending number of prepared statements on server and never deallocated. Per se, this wasn’t a problem for the driver because it is prepared to switch-over to client prepared statements as soon as it is unable to create more on the server, but it wasn’t the desired behavior for sure.

Transactions states managed locally got fixed for when there were exceptions while on the middle of one. Without the fix the rollback and commit wasn’t operating as expected.

The database connection URL syntax got support for several extensions over the year. With that also increased the corner cases that its parsers have to deal with. A couple of them were fixed in this release, specifically a NPE and an incompatibility with host names starting with the word “address”.

Thanks!

Enjoy this new Connector/J release. Get the most out of it by reading its official documentation or by getting the developer’s support directly from the forum channel.

Special thanks to Dong Song Ling and Ryosuke Yamazaki for their valuable contributions.

Thank you all for your support and feedback, and keep in touch!

On behalf of the MySQL Connector/J Team

MySQL Connector/J 6.0.4 has been released

We are pleased to announce the next development release of MySQL Connector/J 6.0 which supports both JDBC 4.2 API and the new X DevAPI.

MySQL Connector/J 6.0.4 can be downloaded from the official distribution channels MySQL Downloads (see the “Development Releases” tab) and The Central repository. MySQL Connector/J source is also available on GitHub.

As always, we recommend that you check the CHANGES file in the download archive and/or the release notes to be aware of changes in behavior that might affect your application.

For documentation please visit the MySQL Connector/J 6.0 Developer Guide.

Note that Connector/J 6.0.4 is a milestone release and not intended for production usage.

I’d like to highlight the most important changes in this release:

X DevAPI connection string

The prefix used in connection string for X DevAPI is now unified between MySQL connectors. The “mysql:x:” we used in previous Connector/J 6.0 releases doesn’t work anymore, please use the “mysqlx:” one to establish XSession:

X DevAPI support for views

The com.mysql.cj.api.x.Table interface now represents both database tables and views. Schema.getTables() returns a list of Table objects for each existing database Table and View. Schema.getTable(name) also returns a Table object if the object with a given name is a View.

A new Table interface method was added:

The com.mysql.cj.api.x.View interface existed in previous Connector/J 6.0 releases isn’t available in Connector/J 6.0.4.

MySQL server compliance

MySQL Connector/J 6.0.4 is suitable for use with MySQL server versions 5.5, 5.6, and 5.7 via Java Database Connectivity (JDBC) 4.2 API.

Due to changes in X Protocol implementation MySQL Connector/J 6.0.4 requires at least MySQL 5.7.14 server when working via X DevAPI.

Thanks!

Enjoy this new Connector/J and thank you all for your support!

On behalf of the MySQL Connector/J Team.

Announcing MySQL Connector/J 6.0

We are pleased to announce the first release of MySQL Connector/J 6.0! This is a new branch of development, which breaks from some of the traditions of the very stable and very mature Connector/J 5.1 branch. We have combed through lots of code and refactored it in order to support development of future features including our X DevAPI implementation and support for X Protocol. This work manifests in a number of visible changes, including revising the growing set of connection and build properties.

Beginning with Connector/J 6.0, we are moving away from having one jar that supports all versions of Java. Instead we are building one jar/package for every supported version of Java. This simplifies the build process as well as lots of code that was required to support many versions of Java. The current package is built for Java 8.

Note that Connector/J 6.0.2 is a milestone release and not intended for production usage.

All changes are documented in the MySQL Connector/J 6.0 Developer Guide.

Updates to connection properties, including removal of several options that are no longer needed with the latest versions of MySQL and Java. Additionally, we removed some legacy behavioral options. You can see the changes in the documentation:
Connector/J 6.0 Changes in Connection Properties

If you are building from source or running the test suite, check the following:
Connector/J 6.0 Changes for Build Properties
Connector/J 6.0 Changes for Test Properties

Finally, API changes and package reorganizations are documented at:
Changes in the Connector/J API

Release notes are available at Changes in MySQL Connector/J 6.0.2 (2016-04-11, Milestone 1).