Version 9.0.0 is a new GA release of MySQL Connector/J. MySQL Connector/J 9.0.0 supersedes 8.4 and is recommended for use on production systems. This release can be used against MySQL Server version 8.0 and later. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.
The version requirements for the third-party libraries and tools needed for running and building Connector/J have been updated. See Connector/J Installation and Installing from Source for details. (WL #16391)
X DevAPI:
Sessions
in the X DevAPI are now autocloseable. Thanks to Daniel Kec for contributing to this patch. (Bug #36574322)Synchronized blocks in the Connector/J code were replaced with
ReentrantLocks
. This allows carrier threads to unmount virtual threads when they are waiting on IO operations, making Connector/J virtual-thread friendly. Thanks to Bart De Neuter and Janick Reynders for contributing to this patch. (Bug #110512, Bug #35223851)The default value of the connection property defaultAuthenticationPlugin has been changed to
caching_sha2_password
. (WL #16376)The list of cipher suites usable by Connector/J has been updated. See
src/main/resources/com/mysql/cj/TlsSettings.properties
in the source for the updated list. (WL #16324)
Trying to use
Connection.setClientInfo()
to clear a client property by setting it tonull
resulted in aNullPointerException
. (Bug #36612566)Many tests in the Connector/J test suite failed when run against MySQL Server 8.4.0, because the
mysql_native_password plugin
is no longer available by default for the Server version. The tests were fixed by adding checks for the availability of the plugin at runtime, or by using some other authentication plugins. (Bug #36529541)When using cursor-based PreparedStatements (
useCursorFetch=true
) containing aLIMIT
clause and setMaxRows(), the number of returned rows was incorrect. (Bug #34721173)The list of MySQL error codes stored in the
com.mysql.cj.exceptions.MysqlErrorNumbers
class have been updated. The updates are reflected in Mapping MySQL Error Numbers to JDBC SQLState Codes. (WL #16342)The static list of MySQL reserved words found in the
DatabaseMetaData
class (which is used by Connector/J when it cannot obtain the list of reserved words from theINFORMATION_SCHEMA.KEYWORDS
table on the server) has been updated. (WL #16324)