Release Notes for MariaDB Connector/J 3.0.7

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.0.7 was released on 2022-08-04. This release is of General Availability (GA) maturity.

Notable Changes

  • For compatibility with MariaDB Connector/J 2.7, when LOAD DATA LOCAL INFILELOAD DATA LOCAL INFILE is executed, an InputStream object can be used as the local infile using the Statement.setLocalInfileInputStream() method. (CONJ-986)

  • The PreparedStatement.setObject() method can be called with a value that differs from the specified SQLType, and the value is converted to the corresponding type. (CONJ-994)

    • For example, the value "true" is accepted when the SQLType is Types.BOOLEAN:

      stmt.setObject(1, "true", Types.BOOLEAN);
      

Issues Fixed

  • When data is read from the ResultSet returned by the DatabaseMetadata.getTypeInfo() method, an error can be raised. (CONJ-993)

    • In previous releases, the following error could be raised:

      java.sql.SQLDataException: integer overflow
      
  • When the timezone connection parameter is set to UTC, an error is raised. (CONJ-990)

    • In previous releases, the following error could be raised:

      Exception in thread "main" java.sql.SQLSyntaxErrorException: (conn=CONN_ID) Setting configured timezone 'UTC' fail on server.
      Look at https://mariadb.com/kb/en/mysql_tzinfo_to_sql/ to load tz data on server, or set timezone=disable to disable setting client timezone.
         at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:280)
         at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:334)
         at org.mariadb.jdbc.client.impl.StandardClient.postConnectionQueries(StandardClient.java:369)
         at org.mariadb.jdbc.client.impl.StandardClient.<init>(StandardClient.java:205)
         at org.mariadb.jdbc.Driver.connect(Driver.java:70)
         at org.mariadb.jdbc.Driver.connect(Driver.java:101)
         at org.mariadb.jdbc.Driver.connect(Driver.java:27)
         at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681)
         at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:229)
      
  • When the ResultSet.getObject() method is used to read a VARBINARYVARBINARY column, a String is returned instead of a byte[]. (CONJ-987)

Upgrade

MariaDB Connector/J 3.0 has been superseded by MariaDB Connector/J 3.3, which is fully compatible with MariaDB Connector/J 3.0. For upgrade instructions: