Release Notes for MariaDB Connector/J 3.0.6

Overview

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

This release is compatible with JDBC 4.2.

MariaDB Connector/J 3.0.6 was released on 2022-06-29. This release is of General Availability (GA) maturity.

Notable Changes

  • The initSql connection parameter has been added. (CONJ-984)

    • The new parameter enables execution of a SQL statement upon connection creation.

    • For example, to execute SET NAMES UTF8 upon connection creation, the following connection string could be used:

    jdbc:mariadb://DB_HOST:DB_PORT/DB?user=DB_USER&password=DB_PASSWD&initSql=SET NAMES UTF8
    
  • The pipelining and bulk optimizations can now be used when allowLocalInfile is enabled as long as the statements do not include LOAD LOCAL INFILE commands. Excluding statements that include LOAD LOCAL INFILE commands is done automatically to prevent performance regression. (CONJ-976)

Issues Fixed

  • PreparedStatement.getGeneratedKeys() does not return an empty ResultSetobject when no keys are generated by an INSERT. (CONJ-953)

  • When a column uses the TIME data type and has a '00:00:00' value, ResultSet.getTime() throws an ArrayIndexOutOfBoundsException if the useServerPrepStmts connection parameter is enabled. (CONJ-975)

  • When a column uses the TINYINT(1) data type, ResultSet.getObject() returns Byte instead of Boolean. (CONJ-979)

  • When a column uses the BIT data type, ResultSet.getObject() returns ByteSet instead of Byte[]. (CONJ-985)

  • When a java.util.Date object is passed to PreparedStatement.setObject(), a java.sql.SQLException is thrown with the message "java.util.Date not supported type". (CONJ-980)