Release Notes for MariaDB Connector/J 3.1.0
This page is part of MariaDB's Documentation.
The parent of this page is: Release Notes for MariaDB Connector/J 3.1
Topics on this page:
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.0 was released on 2022-11-15. This release is of General Availability (GA) maturity.
Notable Changes
Improved load distribution in configurations with multiple servers with load balancing enabled. (CONJ-992)
Starting with this release, nodes are chosen using a round robin algorithm to evenly distribute the load.
Performance improvements when pipelining on a remote server. (CONJ-1015)
Starting with this release, pipelining writes a single byte array of multiple packets to the socket, which allows both
PREPAREandEXECUTEcommands to be placed in the same buffer, and allows two database packets to be combined into a single TCP/IP packet.
Improved performance when dealing with large result-sets due to changes in processing each decode. (CONJ-1009)
Starting with this release, the value decoding method is set depending on the data type.
In previous releases, the column metadata is checked to get the column's data type, signed/unsigned attribute, and other options for each decode.
Improved performance when dealing with large result-sets due to changes in packet handling. (CONJ-1014)
Starting with this release, the parser uses a cache buffer to combine multiple received packets into a single byte array.
In previous releases, each database packet received requires a byte array to be created.
UUID Object Support
Starting with this release, the
ResultSet.getObjectmethod, without class or type precision, returns aUUIDobject for theUUIDobject's fields by default.The feature uses the
UUIDdata format introduced in MariaDB Community Server 10.7, which allows both the getter and the setter to pass thejava.util.UUIDparameter, for example:PrepareStatement setObject(int column, <UUID Object>)orResultSet getObject(int column, UUID.class).
Starting with this release, the following metadata is returned for the corresponding fields of the
UUIDobject:The
ResultSetMetaDataObject's FieldMetadata (version 3.1.0+)
Metadata (version <3.1.0)
getColumnTypeName(int column)uuidCHARgetColumnClassName(int column)java.util.UUIDjava.lang.StringgetColumnType(int column)Types.OTHERTypes.CHARFor compatibility purposes, the
uuidAsStringoption has been added to treat theUUIDobject as aString(as it was prior to this release).
Changed Defaults
The default value for the
useReadAheadInputsocket option has changed tofalse. (CONJ-1008)
