MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J Version 8.x  /  Changes in MySQL Connector/J 8.0.26 (2021-07-20, General Availability)

Changes in MySQL Connector/J 8.0.26 (2021-07-20, General Availability)

Version 8.0.26 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.

Deprecation and Removal Notes

  • The TLSv1 and TLSv1.1 connection protocols are now deprecated. While connections to the server using those TLS versions can still be made with the same negotiation process as before, for any connections established using those TLS versions, Connector/J writes to its logger the message "This connection is using TLSv1[.1] which is now deprecated and will be removed in a future release of Connector/J."

    For background to this deprecation, refer to the IETF memo Deprecating TLSv1.0 and TLSv1.1. It is recommended that connections be made using the more-secure TLSv1.2 and TLSv1.3 protocols. (WL #14559)

Functionality Added or Changed

  • Important Change: The mechanism for deciding on the character set and collation for communication between the server and Connector/J has been changed: instead of following the server's settings by default, they are now determined by the Connector/J connection properties. See Using Character Sets and Unicode for details. (Bug #25554464)

  • Connector/J can now receive client session state changes tracked by the server if the tracking has been enabled on the server. A new connection property, trackSessionState, has been created to enable Connector/J to receive the information with query results when the property is set to true. Thanks to William Lee for contributing to this feature. (Bug #32435618, Bug #102404)

  • Connector/J can now establish connections for accounts that use the authentication_kerberos server-side authentication plugin, which is supported by commercial editions of the MySQL Server since release 8.0.26. See Connecting Using Kerberos for details. (WL #14411)

  • Connector/J now supports Query Attributes when they have been enabled on the server. See Using Query Attributes for details. (WL #14205)

Bugs Fixed

  • X DevAPI: The streaming of DocResult failed if rows were preceded by any Notice messages in the stream. This was because the addProtocolEntity() method of StreamingDocResultBuilder did not return false for attempts to add Notice messages with the method, and that has been fixed by this patch. (Bug #30438500, Bug #97269)

  • When using cursor-based fetching to retrieve rows from the server, Connector/J hung after receiving an error packet, as it kept waiting for an actual data packet to arrive. With this fix, Connector/J throws an error in the situation. (Bug #32954396)

  • Inserting a BLOB into a table using a server-side PreparedStatement resulted in a ClassCastException. (Bug #32766143, Bug #103303)

  • Connector/J of release 8.0.23 and later could not be used in OSGi. It was because the manifest file was missing a few imports needed for OSGi, and this patch fixed the issue. (Bug #32459408, Bug #102372)

  • Connector/J issued unnecessary SET NAMES statements to set collation just to the server’s own setting, which caused performance degradation. To fix this and other problems, a new mechanism for negotiating the character set and collation for communication between the server and Connector/J has been introduced; see Using Character Sets and Unicode for details. Thanks to Marc Fletcher for contributing to the fix. (Bug #31818423, Bug #100606)

  • Rows were duplicated in the ResultSet returned by the DatabaseMetaData.getImportedKeys() method. It was due to a faulty query in the method, which has been corrected by this patch. Thanks to Miron Balcerzak for contributing to the fix. (Bug #29757140, Bug #95280)

  • Connection failed if the ID for the server’s default connection collation is bigger than 255 or if Connector/J specified a custom connection collation. This patch corrects the issue by implementing a new mechanism and a new connection property customCharsetMapping for the negotiation of a collation between the server and Connector/J. See Using Character Sets and Unicode for details. (Bug #25554464)