Version 8.0.24 is the latest General Availability release of the 8.0 series of MySQL Connector/J. It is suitable for use with MySQL Server versions 8.0, 5.7, and 5.6. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.
X DevAPI: For X Protocol connections, the Server now provides three new kinds of notifications for disconnections:
Server shutdown: This is due to a server shutdown. It causes Connector/J to terminate all active and idle sessions connected to the server in the connection pool with the error message "Server shutdown in progress".
Connection idle: This is due to the connection idling for longer than the relevant timeout settings. It causes Connector/J to close the current connection with the error message "IO Read error: read_timeout exceeded".
Connection killed: This is due to the connection being killed by another client session. It causes Connector/J to close the connection in the current session with the error message “Session was killed".
A new connection property, scrollTolerantForwardOnly, has been introduced, which preserved the legacy behavior of Connector/J 8.0.17 and earlier by tolerating backward and absolute cursor movements on result sets of type
ResultSet.TYPE_FORWARD_ONLY. This is for maintaining compatibility with legacy code that took advantage of the old behavior. See the description for scrollTolerantForwardOnly for details. (Bug #31747910)
References: See also: Bug #30474158.
Connector/J now supports "userless" authentication for JDBC connections: When the user for the connection is unspecified, Connector/J uses the name of the OS user who runs the application for authentication with the MySQL server. See Connector/J: Obtaining a connection from the
DriverManagerfor more details.
Starting from this release, whenever an authentication plugin is explicitly set for the connection property defaultAuthenticationPlugin, the specified plugin takes precedence over the server's default when Connector/J negotiates a plugin with the server. There is no behavioral change for Connector/J if no value is explicitly set for the property, in which case the server's choice of default plugin takes precedence over the implicit default of
mysql_native_passwordfor Connector/J. See the description of defaultAuthenticationPlugin for details.
In the past, for JDBC connections, when the server closed a session because a client was idling beyond the period specified by the server's
wait_timeoutsystem variable, Connector/J returned a generic IO error. Connector/J now relays a clearer error message from the server.
X DevAPI: Concurrently getting and closing multiple sessions from the same X DevAPI
Clientobject might result in a
ConcurrentModificationExceptionthrown by Connector/J at the closing of a session. (Bug #31699993)
X DevAPI: Under some specific conditions, when using Deflate as the algorithm for compression of X Protocol connections, Connector/J threw an
ASSERTION FAILED: Unknown message type: 57). It was because when a compressed packet was just a few bytes longer than the size of some internal buffer used by a Java
InflaterInputStream, the leftover bytes from the inflate procedure were being discarded by Connector/J, causing inflation of subsequent packets to fail. With this fix, no data bytes are discarded, and the inflation works as expected. (Bug #31510398, Bug #99708)
SecurityManagerwas in place, connections to a MySQL Server could not be established unless the client had been properly configured to use SASL-based LDAP authentication. It was because the
AuthenticationLdapSaslClientPluginin Connector/J requires a special permission to load the provider
SecurityManageris in place; but since the provider was loaded by a static initializer during initialization for the plugin, the lack of the permission was causing an error and then failures for all connections, even if the plugin was never used or enabled. This fix changes how the provider is loaded: the loading now happens only at the plugin instance's initialization and the initialization was deferred to the time when the plugin is actually needed, so that connections that do not use SASL-based LDAP authentication are unaffected by security settings regarding the plugin. (Bug #32526663, Bug #102188)
When using Connector/J 8.0.23,
ResultSetMetaData.getColumnClassName()did not return the correct class name corresponding to
DATETIMEcolumns. (Bug #32405590, Bug #102321)
Creation of an
UpdatableResultSetfailed with a
NullPointerExceptionwhen it was generated by querying a view with a derived value. (Bug #32338451, Bug #102131)
CHAR_OCTET_LENGTHcolumn of the
getFunctionColumns()) resulted in a
NumberOutOfRangeexception when the column's value exceeded 232 − 1. With this patch, the value of 232 − 1 is returned in the situation. (Bug #32329915, Bug #102076)
Connections to a server could not be established when the user supplied an implementation of the
ConnectionPropertiesTransforminterface using the connection property propertiesTransform. This was because Connector/J called
PropertyKey.HOST.getKeyName()for getting the host name, and that has been corrected by this fix. (Bug #32151143, Bug #101596)
NullPointerExceptionwas returned when a statement that could not be used as a
ServerPreparedStatementwas executed and the connection property useUsageAdvisor was set to
true. With this fix, a
SQLExceptionis returned instead. (Bug #32141210, Bug #101558)
setSessionMaxRows()method on a closed connection resulted in a
NullPointerException. With this fix, a
SQLNonTransientConnectionExceptionis thrown instead, with the error message "No operations allowed after connection closed." (Bug #22508715)
setObject()method for a target type of
Types.TIMEresulted in a
SQLExceptionwhen the value to be set had a fractional part, or when the value did not fit any pattern described in Date and Time Literals. This patch introduced a new logic that can handle fractional parts; also, it performs the conversion according to the patterns of the literals and, when needed, the target data type. (Bug #20391832)