I’m pleased to announce that MySQL Connector/J 5.1.38 Maintenance Release is now generally available.
MySQL Connector/J 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.
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.
MySQL Connector/J 5.1.38, although released shortly after its predecessor, includes several important fixes and improvements. Most of them related to MySQL Fabric, multi-host replication aware connections support and support for TLSv1.2 and new encryption defaults. Even if you don’t require such features, we do recommend the upgrade to the latest version.
I’d like to highlight some of the most relevant fixes and improvements in this release:
MySQL Fabric and Multi-Host Replication Connections Revision
MySQL Fabric support in Connector/J is based on multi-host replication aware connections and the ability to dynamically manage server groups. Most of the server groups management is done automatically and, possibly, concurrently. The combination of all these features was never thoroughly used and stressed as much as now and the consequence is that they were effectively in need of some improvements.
This release ships with a fully re-factored multi-host replication aware connections support, which now inherits from the same base architecture as the remaining multi-host connections alternatives, the fail-over connections and load-balanced connections. This architecture provides a layered connection support structure and an improved statement execution routing model that effectively determines the correct physical connection to use at execution time, also fixing, by this way, a couple of existing bugs. The synchronization model in the server groups management was revised as well in order to overcome a few known thread deadlock situations. As a direct result the fail-over in MySQL Fabric support is now way more robust.
In the process of the improvements made in multi-host replication aware connections, two new connection properties were added:
allowSlaveDownConnections
. This property sets the behavior for establishing replication aware connections when no slave hosts available. While, previously, this would result in a failed connection attempt, now we can define the behavior we prefer. This property takes a boolean value:
allowSlaveDownConnections=true|false
readFromMasterWhenNoSlaves
. This property sets the behavior for the situations where, at run-time, all slave hosts in a replication aware connection become unavailable. The alternatives “should it fail?”, the only possible outcome before introducing this property, or “should the master host(s) be used in their place?”, are now available to the developer. Mind that when you set the option to use the master host(s), they will be used in read-only state as if they were slave hosts. Also mind that setting this property to true
might, transparently, incur in extra load to the master host(s). This property takes a boolean value:
readFromMasterWhenNoSlaves=true|false
Security Compliance and Improvements
In its way of complying with the up-to-date security regulations and requirements, MySQL server 5.7 is now shipped with SSL/TLS enabled by default and any clients connecting to it should make use of such data protection features by default as well. Following this path, Connector/J 5.1.38 prioritizes the usage of SSL/TLS when establishing connections to this server. The missing support for TLSv1.2 and TLSv1.1 was additionally included in this release.
Connector/J now attempts to use the highest security layer available at run-time, starting from TLSv1.2 and, at the end, providing the best encryption system possible for the moment. This obviously depends on the MySQL server version we are connecting to and on the JVM version in use. In some situations it may be somewhat complex to find a compatible set of cyphers that can be used in both ends and some tweaks or adjustments could be required. The connection property enabledSSLCipherSuites
may be a good companion in such cases.
Additional Bug Fixes
This release also includes a few other minor bug fixes. Although not especially relevant, these fixes help improving the overall quality of this Connector/J release.
Thanks!
Thank you all for your support. Enjoy this new Connector/J and keep in touch!
On behalf of the MySQL Connector/J Team.