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


MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J Version 9.x  /  Changes in MySQL Connector/J 9.1.0 (2024-10-15, General Availability)

Changes in MySQL Connector/J 9.1.0 (2024-10-15, General Availability)

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

  • When connecting to a server using SSL, the truststore password is now made optional, with a null truststore password taken to mean that there is no need to check the truststore's keyed digest. Thanks to Jesper Blomquist for contributing to the patch. (Bug #114705, Bug #36539680)

  • isTimestamp() no longer creates a regular expression Pattern instance when it is called, which leads to better code performance. (Bug #114410, Bug #36434816)

  • Connector/J now supports the OpenID Connect authentication protocol, which is supported by MySQL Enterprise 9.1.0 and later. See Connecting Using OpenID Connect Authentication for details. (WL #16490)

Bugs Fixed

  • The PrepareCall() method failed when the schema name was used in the connection URL and when any call parameter had a question mark in it. (Bug #36936407)

  • When using PreparedStatements, negative DATE values were inserted as some positive values instead of being rejected. (Bug #116114, Bug #37067812)

  • Repeated calls of the same procedure or function would fail when using callableStatements due to the failure of Connector/J to cache and map the correct information for the procedure or function parameters. (Bug #115265, Bug #36843227)

  • Setting closeOnCompletion() on a PreparedStatement made statement reuse fail in some cases, as the closing and caching of the statement were not performed correctly. (Bug #113509, Bug #36154975)

  • After using executeBatch() to insert rows into a table and adding more rows with executeUpdate(), getGeneratedKeys() returned the wrong keys for the inserted rows. (Bug #112790, Bug #35936477)

  • When retrieving a ResultSet column using getString() for a field with the ZEROFILL flag on, the result was not zero padded. (Bug #110586, Bug #35254470)

  • When the connection properties rewriteBatchedStatements, useServerPrepStmts and cachePrepStmts were all set to true, inserting duplicated keys in batches caused the wrong kind of exception to be thrown by Connector/J. (Bug #109418, Bug #36043556)

  • When a QueryTimer was set, if a session failed, Connector/J returned a NullPointerException. With this fix, a SQL Exception is returned instead. Thanks to Anthony Milbourne for contributing to this patch. (Bug #108415, Bug #34579258)

  • When adding a long SQL string to a batched Statement, if the string's length was greater than the value of maxAllowedPacket, an ArrayIndexOutOfBoundsException was thrown. With this fix, checks are now in place so that a SQLException is thrown instead in the situation. (Bug #101054, Bug #32544786)

  • When rewriteBatchedStatements was set to true, Connector/J failed to detect some cases in which server-side PreparedStatements could not be used, resulting in errors for the statement preparations. With this fix, Connector/J detected the issues and uses client-side PreparedStatements instead in those situations. (Bug #96623, Bug #30221117)

  • PreparedStatments executed with the connection property includeThreadNamesAsStatementComment set to true did not include the name of the current thread in a comment as expected. This fix corrected the omission. Thanks to Yyjun Yyjun for contributing to this patch. (Bug #84117, Bug #25247468)