Documentation Home
MySQL Connector/J Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 396.8Kb
PDF (A4) - 395.8Kb


MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J Version 9.x  /  Changes in MySQL Connector/J 9.5.0 (2025-10-22, General Availability)

Changes in MySQL Connector/J 9.5.0 (2025-10-22, General Availability)

Note

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.

Functionality Added or Changed

  • SequentialBalanceStrategy is now available as a load-balancing strategy that can be selected by setting the connection property "ha.loadBalanceStrategy=sequential". (Bug #42777, Bug #11751788)

Bugs Fixed

  • 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 cached BigDecimal zero 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, the SHOW ENGINE command 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 executeUpdate method 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 equals method on MultiHostConnectionProxy with a null argument resulted in a NullPointerException. Errors were returned similar to the following:

            java.lang.NullPointerException: null

    (Bug #34104230)

  • The Windows time zone Coordinated Universal Time was 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 loadBalanceConnectionGroup property 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. The loadBalanceConnectionGroup option 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 useServerPrepStmts option was set to true, the setBinaryStream() 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 setSavepoint API 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 useServerPrepStatements was set to false, 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)