These release notes were created with the assistance of MySQL HeatWave GenAI.
Version 9.5.0 is a new GA release of MySQL Connector/J. MySQL Connector/J 9.5.0 supersedes 9.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.
SequentialBalanceStrategyis now available as a load-balancing strategy that can be selected by setting the connection property "ha.loadBalanceStrategy=sequential". (Bug #42777, Bug #11751788)
-
Rendering of PreparedStatement queries ,by replacing placeholders with the given parameters, failed to properly escape string values containing quote characters, resulting in syntactically incorrect SQL.
Our thanks to Feng Shen for the contribution. (Bug #38222681)
-
When fetching zero values as
BigDecimal, MySQL Connector/J created new instances unnecessarily, increasing memory usage. As of this release, internally cachedBigDecimalzero values (with appropriate scale) are reused wherever possible, reducing memory overhead.Our thanks to Chengjun Huang for the contribution. (Bug #38022329)
-
When using cursor fetch with certain storage engines, such as
BLACKHOLE, theSHOW ENGINEcommand may not complete. Errors were returned similar to the following:TimeoutException (30secs)(Bug #35716608)
-
Executing a SELECT statement that writes to an OUTFILE using the
executeUpdatemethod did not write the query results to a file. Errors were returned similar to the following:Can not issue executeUpdate() or executeLargeUpdate() with statements that produce result sets(Bug #34464351)
-
Calling the
equalsmethod onMultiHostConnectionProxywith anullargument resulted in aNullPointerException. Errors were returned similar to the following:java.lang.NullPointerException: null(Bug #34104230)
-
The Windows time zone
Coordinated Universal Timewas not supported. The time zone mappings were updated using the latest CLDR and IANA Time Zone databases.Our thanks to Frédéric Barrière for the contribution. (Bug #31195955)
-
Empty keyStore files are now supported for keyStoreTypes that do not require a defined keystore.
Our thanks to Kolbe Kegel for the contribution. (Bug #30932850)
When using the
loadBalanceConnectionGroupproperty on a replication-aware connection, the source host list was overwritten by the replica list. This resulted in writes being directed to replica nodes instead of the source node. TheloadBalanceConnectionGroupoption is no longer supported on replication-aware connections and now raises a connection exception. (Bug #23146631)The
isSameRM()method incorrectly considered the database name in addition to host and port for resource manager comparison, leading to improper identification of the resource manager. The database name is no longer included in the comparison logic. (Bug #18403804)-
If the
useServerPrepStmtsoption was set totrue, thesetBinaryStream()method did not honor the length parameter passed, which led to errors when executing prepared statements with large data. Errors were returned similar to the following:Parameter of prepared statement which is set through mysql_send_long_data() is longer than 'max_allowed_packet' bytes(Bug #17881458)
-
If a connection was associated with a global XA transaction, invoking the
setSavepointAPI resulted in an exception, despite the server's capability to create savepoints. Errors were returned similar to the following:java.sql.SQLException: Can't set autocommit to 'true' on an XAConnection(Bug #16722068)
If
useServerPrepStatementswas set tofalse, binary data was not encoded, which led to syntax errors with multi-byte character sets. As of this release, binary data is encoded in hexadecimal. (Bug #11754018)