Release Notes for MariaDB Connector/J 3.1.3

Overview

MariaDB Connector/J is a lightweight JDBC driver (Type 4) for building applications on top of MariaDB database products with Java 8, Java 11, and Java 17.

This release is compatible with JDBC 4.2.

MariaDB Connector/J 3.1.3 was released on 2023-03-22. This release is of General Availability (GA) maturity.

Issues Fixed

  • When a custom credential plugin is implemented using the CredentialPlugin interface, a race condition can cause connection failures to occur in multi-threaded environments. (CONJ-1054)

    • In previous releases of Connector/J 3.0 and 3.1, multiple threads could try to use the same static ServiceLoader<CredentialPlugin> instance to load multiple CredentialPlugin instances, which would cause a race condition between threads.

    • Starting with this release, when a thread tries to load a CredentialPlugin instance, the thread dynamically creates a new ServiceLoader<CredentialPlugin> instance for its own use, so that multiple threads do not use the same instance.

  • When a TLS plugin is implemented using the TlsSocketPlugin interface, a race condition can cause errors to occur. (CONJ-1054)

    • In previous releases, the current thread's class loader was used to load TlsSocketPlugin instances, which would cause errors like the following to occur in some threads:

      Client has not found any TLS factory plugin with name 'NAME'
      
    • Starting with this release, Connector/J's internal class loader is used to load TlsSocketPlugin instances.

  • When the DatabaseMetadata.getTypeInfo() method is used to return data type metadata, an incorrect value is returned for the UNSIGNED_ATTRIBUTE column. (CONJ-1063)

    • In previous releases, the UNSIGNED_ATTRIBUTE column is always true.

    • Starting with this release, the UNSIGNED_ATTRIBUTE column is only true when a numeric column is defined with the UNSIGNED attribute.

  • When connected to a Unix domain socket, Connector/J reads incorrect data when the packet size is greater than 32K. (CONJ-1056)

  • With the binary protocol, when a TIME columns has value 00:00:00, the value is not correctly decoded. (CONJ-1057)

  • The org.mariadb.jdbc.Statement class does not implement the various quote-related methods from the JDBC 4.3 API. (CONJ-1058)

    • In previous releases of Connector/J 3.0 and 3.1, the JDBC API's default quote-related methods are used, which can result in the wrong quotation characters being used.

    • Starting with this release, the following quote-related methods are implemented for the org.mariadb.jdbc.Statement class:

      • String enquoteLiteral(String val)

      • String enquoteIdentifier(String identifier, boolean alwaysQuote)

      • String enquoteNCharLiteral(String val)

      • boolean isSimpleIdentifier(String identifier)

  • When a BIT(1) column is queried and the transformedBitIsBoolean parameter is disabled, Connector/J sets the default column metadata to BOOLEAN instead of BIT. (CONJ-1060)