Release Notes for MariaDB Connector/J 3.0.3

Overview

MariaDB Connector/J is an interface between Java applications and MariaDB Server. MariaDB Connector/J enables the development of Java 8 and Java 11 applications for MariaDB database products.

This is the first GA (General Availability) release of MariaDB Connector/J and it includes a variety of new features and fixes, compared to MariaDB Connector/J 2.7.

MariaDB Connector/J 3.0.3 was released on 2022-01-25. This release is of General Availability (GA) maturity. This release is compatible with JDBC 4.2.

Notable Changes

  • The session_track_schema system variable is not set anymore when connecting, as this is typically the server default. (CONJ-914)

  • Fully implements JPMS modularity when using Java 9 and later. This change improves security by hiding and protecting internal packages from reflection. This change improves performance by enabling faster detection of missing modules on startup and lighter packaging for standalone applications. (CONJ-879)

  • The Security Manager code has been removed since the security changes it made were deprecated in JEP411. (CONJ-912)

  • Keepalive is now enabled by default. (CONJ-911)

  • Several options are not set anymore when connecting, as they are typically the server default. (CONJ-913) These include:

    • Autocommit is not set to true anymore. If the server's default for the autocommit system variable was changed to false, the client will now need to explicitly enable autocommit. For example: jdbc:mariadb://HOST/DATABASE?autocommit=true

    • The connector does not force STRICT_TRANS_TABLES to be enabled in the sql_mode.

    • The SQL command SELECT @@max_allowed_packet, @@wait_timeout; is not executed when connecting anymore, as these parameter values are not always needed.

  • The connection string parser only accepts jdbc:mariadb: as the protocol in connection strings by default. When both MariaDB Connector/J and the MySQL drivers are found in the class-path, using jdbc:mariadb: as the protocol helps to ensure that Java chooses MariaDB Connector/J. (CONJ-910)

    • Connector/J still allows jdbc:mysql: as the protocol in connection strings when the permitMysqlScheme option is set. For example: jdbc:mysql://HOST/DATABASE?permitMysqlScheme

  • Support for useMysqlMetadata option added for MariaDB Connector/J 2.7 compatibility. (CONJ-894)

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: