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


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

Changes in MySQL Connector/J 9.4.0 (2025-07-22, General Availability)

Note

These release notes were created with the assistance of MySQL HeatWave GenAI.

Version 9.4.0 is a new GA release of MySQL Connector/J. MySQL Connector/J 9.4.0 supersedes 9.3 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.

Installation and Compilation Notes

Functionality Added or Changed

  • You can now retrieve a UUID from a ResultSet as a java.util.UUID object by calling getObject(column, UUID.class), instead of having to use different getters for different column types. Thanks to Iwao Abe for contributing the code. (Bug #117579, Bug #37639722)

  • The ResultSet.HOLD_CURSORS_OVER_COMMIT mode is now consistently supported across connections, statements, and result sets, which was not the case before this fix. However, to preserve backward compatibility with previous behaviors, setting invalid or unknown holdability constants will result in exceptions only if the connection property pedantic is set to true. (Bug #44791, Bug #11753361)

  • To simplify the codebase of Connector/J, the IterateBlock class has been removed, with its function replaced by traditional for loops. (WL #16917)

Bugs Fixed

  • When using the authentication_oci_client plugin, Connector/J failed to parse the private key file correctly when it contained the optional security marker OCI_API_KEY at the end. (Bug #38044940)

  • A java.sql.Time instance created from a negative millisecond value, when inserted into a database via using a PreparedStatement, lost its fractional part of the seconds. (Bug #37785888)

  • The method getObject(String , Class<T>) returned a java.lang.AbstractMethodError for a pooled connection. The error was due to some missing method implementations in the class CallableStatementWrapper, which are supplied by this patch. (Bug #22473405)

  • DatabaseMetadata.getProcedureColumns() and DatabaseMetadata.getFunctionColumns() returned incorrect information when the procedure or function column names include whitespace characters. (Bug #21294134)

  • CallableStatement.registerOutParameter() failed when the procedure name or parameters contained special characters. (Bug #20279578)

  • A number of connection properties (for example, maxAllowedPacket and resultSetSizeThreshold) accepted negative values while they should not. Connector/J now throws exceptions when users try to set negative values to them. (Bug #19948601)

  • Enabling allowMultiQueries without also enabling rewriteBatchedStatements caused statements to be rewritten, which was not the expected behavior. With this fix, allowMultiQueries only allows users to execute multiple queries in a single Statement, whereas batching, including statement rewriting, is governed exclusively by rewriteBatchedStatements. (Bug #118201, Bug #37971552)

  • When using Connector/J 9.3.0 0 with useInformationSchema=true, calling DatabaseMetaData.getTables with the arguments catalog, schemaPattern and tableNamePattern set to null caused an SQL syntax exception. (Bug #118100, Bug #37900711)

  • When calling the method Statement.setMaxRows() with a negative argument, an exception was thrown with the incorrect message stating that the set value was larger than 50000000. (Bug #118079, Bug #37888527)

  • If the jdk.charsets module was not loaded into the JVM, Connector/J mapped UTF-8 connections to the MySQL eucjpms characterset. This fix corrected the internal character set mapping priority, so that utf8mb4 is selected in such scenarios. (Bug #116120, Bug #37079448)

  • In the Open Telemetry tracing information, commit operations appeared as Rollback spans. This fix corrected them to be Commit spans. Thanks to Willem Fibbe for contributing the fix. (Bug #115845, Bug #36954268)

  • Inserting unsigned big numbers into a database using a prepared statement failed with a MysqlDataTruncation exception when the values are above a certain threshold. Thanks to Yohei Ueki for contributing the patch. (Bug #109339, Bug #34898663)

  • Executing DatabaseMetadata.getColumns() with useInformationSchema=true and setting connectionCollation to anything other than utf8mb3_general_ci would cause a java.sql.SQLException for Illegal mix of collations. It was because the collations differ between the connection and the information_schema. This patch fixes the metadata query executed in getColumns() so that the collations match. (Bug #98620, Bug #31503893)

  • CallableStatement.getObject() did not return an object in the proper type when a parameter name string was used as its argument. (Bug #77766, Bug #21503942)

  • Canceling a query while streaming results with java.sql.Statement.cancel() could leave the connection in an inconsistent state. Subsequent queries also might fail. The behavior was also affected by the connection properties clobberStreamingResults and dontTrackOpenResources, which were not consistently respected. This patch corrects the unexpected behavior, so that a connection can now be reused safely after canceling a streaming query. Nevertheless, it is still strongly recommended to explicitly close any open result sets before executing new queries. (Bug #77658, Bug #21946136)

  • Connection.setNetworkTimeout() has been reimplemented, so that the executor object passed to it is now ignored (even if it is null) and the timeout value is now configured directly. (Bug #75615, Bug #21181249)

  • The com.mysql.cj.jdbc.CallableStatement.extractProcedureName() method might throw an SQLException when encountering whitespace characters in the procedure or function names. (Bug #75441, Bug #20344798)