MariaDB Connector/J 3.0.0 Release Notes

You are viewing an old version of this article. View the current version here.

The most recent Stable (GA) release of MariaDB Connector/J is:
MariaDB Connector/J 3.4.1

Download Release Notes Changelog Connector/J Overview

Release date: 04 May 2021

MariaDB Connector/J 3.0.0 is a Alpha (Alpha) release.

NOTE: MariaDB Connector/J 3.0.0 is fully compatible with the latest release of version 2.7. Further maintenance releases will not be provided for version 2.7 when GA.

For an overview of MariaDB Connector/J see the About MariaDB Connector/J page

Notable Changes

This version is a complete rewrite of java driver. The Goal beeing having a more performant, easy to read, extendable small driver.

  • complete rewrite, code simplification / clarification, reduced size (15%), more than 90% coverage tested.
  • performance improvement:
  • Prepare and execution are now using pipelining when using option `useServerPrepStmts`
  • performance enhancement with MariaDB 10.6 server when using option `useServerPrepStmts`, skipping metadata (see https://jira.mariadb.org/browse/MDEV-19237)

SSL configuration

New Options :

sslModeIndicate SSL demand. Possible value :
* 'disable'
* 'trust': no certificate to provide and no hostname validation. permit encryption, without any validation
* 'verify-ca': Encryption, certificates validation, BUT no hostname verification
* 'verify-full': Standard SSL use: Encryption, certificate validation and hostname
Default: 'disable'

option `useSsl`, `trustServerCertificate` and `disableSslHostnameVerification` still exists, but `sslMode` permit easier configuration

Easy logging

If using log4j, just enabled package "org.mariadb.jdbc" log.

  • level ERROR will log connection error
  • level WARNING will log query errors
  • level DEBUG will log queries
  • level TRACE will log all exchanges with server.

If not using log4j, console will be used. If really wanting to use JDK logger, System property "mariadb.logging.fallback" set to JDK will indicate to use common logging.

Failover

Failover implementation now permit to redo transaction : when creating a transaction, all command will be cached, and can be replay in case of failover.

This functionality can be enabled using option `transactionReplay`.

This is not enabled by default, because this required that application to avoid using non-idempotent commands.

example: ```sql START TRANSACTION; select next_val(hibernate_sequence); INSERT INTO myCar(id, name) VALUE (?, ?) with parameters: 1, 'car1' INSERT INTO myCarDetail(id, carId, name) VALUE (?, ?, ?) with parameters: 2, 1, 'detail1' INSERT INTO myCarDetail(id, carId, name) VALUE (?, ?, ?) with parameters: 3, 2, 'detail2' COMMIT; ```

Allow setup of socket TCP_KEEPIDLE, TCP_KEEPCOUNT, TCP_KEEPINTERVAL

Equivalent options are `tcpKeepIdle`, `tcpKeepCount`, `tcpKeepInterval` Since available only with java 11, setting this option with java < 11 will have no effect.

permit authentication plugin restriction

New Options :

restrictedAuthif set, restrict authentication plugin to secure list. Default provided plugins are mysql_native_password,client_ed25519,auth_gssapi_client,caching_sha2_password,dialog and mysql_clear_password
Default: null

example setting `restrictedAuth` to "mysql_native_password,client_ed25519,auth_gssapi_client", only those plugins can be use. If server return ask for an authentication plugin not listed in `restrictedAuth`, driver will throw an exception.

Extendable

Driver is build with Service Provider Interface (SPI) permitting easy way to extend Driver. Possible extension :

  • org.mariadb.jdbc.codec.Codec permitting encoding/decoding type
  • org.mariadb.jdbc.plugin.authentication.AuthenticationPlugin : Permit Authentication plugin addition. Default are "mysql_clear_password", "auth_gssapi_client", "client_ed25519", "mysql_native_password", "dialog" (PAM) and "caching_sha2_password"
  • org.mariadb.jdbc.plugin.credential.CredentialPlugin permitting login/password retrieval. Default are "AwsIamCredentialPlugin" to permit retrieve a temporary IAM authentication, "EnvCredentialPlugin" to get environment authentication and "PropertiesCredentialPlugin" to get authentication info from java property
  • org.mariadb.jdbc.plugin.tls.TlsSocketPlugin to permit extend TLS implementation

Bugs Fixed

  • CONJ-864 includeThreadDumpInDeadlockExceptions always includes the thread dump, even when it is not a deadlock exception
  • CONJ-858 Properties parameter that differ from string not taken in account

Changelog

For a complete list of changes made in MariaDB Connector/J 3.0.0, with links to detailed information on each push, see the changelog.

Note: This page describes features in an unreleased version of MariaDB Connector/J.

Unreleased means there are no official packages or binaries available for download which contain the features. The source code is available on GitHub.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.