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


MySQL Connector/J Release Notes  /  Changes in MySQL Connector/J Version 8.x  /  Changes in MySQL Connector/J 8.0.33 (2023-04-18, General Availability)

Changes in MySQL Connector/J 8.0.33 (2023-04-18, General Availability)

Version 8.0.33 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 and 5.7. It supports the Java Database Connectivity (JDBC) 4.2 API, and implements the X DevAPI.

Functionality Added or Changed

  • The JAR library for Connector/J has been renamed to mysql-connector-j.jar since release 8.0.31. Since then, upgrading Connector/J from 8.0.30 or earlier using RPM or DEB packages would change the name of the original .jar file, causing some applications that depend on it to fail. With this fix, RPM and DEB packages for Connector/J create a symbolic link to make the old name /usr/share/java/mysql-connector-java.jar point to the new name /usr/share/java/mysql-connector-j.jar. (For the commercial versions, the symbolic link mentioned has -commercial in it.) (Bug #35018216)

  • Connector/J now supports OCI authentication using an ephemeral key pair. A new connection property, ociConfigProfile, has been introduced for specifying the configuration profile (defined in the OCI configuration file) to be used for authentication. If ociConfigProfile is not specified, the DEFAULT profile is used. See Token-based Authentication for the CLI for more details. (WL #15490)

Bugs Fixed

  • RPM packages for Connector/J 8.0.31 and 8.0.32 failed to upgrade earlier versions of Connector/J. This was due to misconfigurations of the RPM packages, which has been corrected by this fix. (Bug #35110706)

  • Pluggable custom classes provided to Connector/J were initialized even when they were not actually usable. With this fix, these classes are validated against the interface they implement before their static initialization. (Bug #34918989)

  • For Connector/J 8.0.29 or later, client-side prepared statements failed with the error "Incorrect string value" when setCharacterStream() was used, if the JVM's character encoding did not match the target column's character set. It was because, in that case, the character encoding of the JVM was used when sending character streams to the server, which was unable to decode them as they were expected to be encoded with the column's character set. With this fix, the character set specified by either the connection property clobCharacterEncoding or characterEncoding is used instead, for both client-side and server-side prepared statements, which is the expected behavior. (Bug #34558945)

  • When connecting to MySQL Server 5.7 and earlier with Connector/J 8.0.32, Connector/J sometimes hung after the prepare phase of a server-side prepared statement. (Bug #109864, Bug #35034666)

    References: This issue is a regression of: Bug #33968169.

  • Results returned by the getPrimaryKeys() method of the DatabaseMetadata interface were not sorted by COLUMN_NAME as required by the JDBC specification. (Bug #109808, Bug #35021038)

  • Results returned by the getTypeInfo() method of the DatabaseMetadata interface were not sorted by DATA_TYPE as required by the JDBC specification. (Bug #109807, Bug #35021014)

  • Rewriting of batched statements failed when a closing parenthesis was found within a VALUES clause. It was because QueryInfo failed to parse the prepared statement properly in that case. With this fix, the parser of VALUES clauses is improved, so that Connector/J is now able to recognize rewritability of statements that contain function calls or multiple VALUES lists, and it also handles well the cases when the string "value" is part of a table name, a column name, or a keyword. (Bug #109377, Bug #34900156, Bug #107577, Bug #34325361)

  • Before executing a query with Statement.executeQuery(query), Connector/J checks if the query is going to produce results and rejects it if it cannot. The check wrongly rejected queries that had a WITH clause in which there was no space after the comma between two common table expressions. (Bug #109243, Bug #34852047)

  • When the connection property useLocalTransactionState was set to true, after a number of insert statements were executed and the last one hit a unique constraint check, the transaction could not be rolled back. It was because Connector/J lost track of the transaction statuses of the statements in the case, and this patch corrects the problem. (Bug #109013, Bug #34772608)

  • When both the connection properties useLocalTransactionState and rewriteBatchedStatements were set to true, prepared statements could not be committed. It was because Connector/J lost track of the transaction statuses of the statements created internally to run the rewritten queries, and this patch corrects the problem. (Bug #108643, Bug #34652568)

  • When executing a LOAD DATA LOCAL INFILE statement, the file could not be loaded if a relative path of it was used and the path was not relative to the directory in which the JVM was started. This patch fixes the behavior by resolving the relative path using the Java system property user.dir, which was ignored before in the process. (Bug #77368, Bug #21321849)