> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/release-notes/connectors/java/2.1/2.1.0.md).

# Connector/J 2.1.0 Release Notes

{% hint style="info" %}

<p align="center">The most recent release of <a href="/spaces/CjGYMsT2MVP4nd3IyW2L/pages/Y7PAVcAiFWL6chXpLkk5">MariaDB Connector/J</a> is: <a href="/pages/11aRnlmZLQuDGG1JwEfE"><strong>3.5.9</strong></a></p>

<p align="center"><a href="https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector" class="button primary">Download Connector/J 3.5.9</a></p>
{% endhint %}

[Download](https://downloads.mariadb.org/connector-java/2.1.0/) | **Release Notes** | [Changelog](/docs/release-notes/connectors/java/changelogs/2.1/2.1.0.md) | [About MariaDB Connector/J](/docs/connectors/mariadb-connector-j/about-mariadb-connector-j.md)

**Release date:** 31 July 2017

MariaDB Connector/J 2.1.0 is a [***Stable***](/docs/release-notes/community-server/about/release-criteria.md) ***(GA)*** release.

{% hint style="info" %}
**For an overview of MariaDB Connector/J see the** [**About MariaDB Connector/J**](/docs/connectors/mariadb-connector-j/about-mariadb-connector-j.md) **page**
{% endhint %}

## Notable Changes

This version is a general availability (GA) release.\
(2.x version need java 8+)

## Notable changes and additions

### [CONJ-422](https://jira.mariadb.org/browse/CONJ-422) : verification of SSL Certificate Name Mismatch

When using ssl, driver check hostname against the server's identity as presented in the server's Certificate (checking alternative names or certificate CN) to prevent man-in-the-middle attack.\
Verification is disabled when the option "trustServerCertificate" is set.

A new option "disableSslHostnameVerification" permit to deactivate this validation.

### [CONJ-400](https://jira.mariadb.org/browse/CONJ-400) - Galera validation

When configuration with multi-master, Connection.isValid() will not only validate connection, but host state (@@wsrep\_cluster\_status).\
A connection to a node that is not in primary mode will return false (meaning that in pool, connection will be discarded)

### [CONJ-322](https://jira.mariadb.org/browse/CONJ-322) - ResultSet.update\* methods implementation

ResultSet.update\* methods aren't implemented\
statement using ResultSet.CONCUR\_UPDATABLE are now able to update record.\
example:

```java
Statement stmt = con.createStatement(
                                  ResultSet.TYPE_SCROLL_INSENSITIVE,
                                  ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = stmt.executeQuery("SELECT age FROM TABLE2");
    // rs will be scrollable, will not show changes made by others,
    // and will be updatable
    while(rs.next()){
        //Retrieve by column name
        int newAge = rs.getInt(1) + 5;
        rs.updateDouble( 1 , newAge );
        rs.updateRow();
    }
```

### [CONJ-389](https://jira.mariadb.org/browse/CONJ-389) - faster batch insert

Use dedicated [COM\_STMT\_BULK\_EXECUTE](/docs/server/reference/clientserver-protocol/3-binary-protocol-prepared-statements/com_stmt_bulk_execute.md) protocol for batch insert when possible.\
(batch without Statement.RETURN\_GENERATED\_KEYS and streams) to have faster batch (significant only if server >= [MariaDB 10.2.7](/docs/release-notes/community-server/old-releases/10.2/10.2.7.md)).

A new option "useBulkStmts" permit to deactivate this functionality.

### other evolution

* \[[CONJ-508](https://jira.mariadb.org/browse/CONJ-508)] Connection.getCatalog() optimisation for 10.2+ server using new session\_track\_schema capabilities
* \[[CONJ-492](https://jira.mariadb.org/browse/CONJ-492)] Failover handle automatic reconnection on KILL command

### Bug

* \[[CONJ-502](https://jira.mariadb.org/browse/CONJ-502)] isolation leak when using multiple pools on same VM on failover
* \[[CONJ-503](https://jira.mariadb.org/browse/CONJ-503)] regression on aurora Connection Connection.isReadOnly()
* \[[CONJ-505](https://jira.mariadb.org/browse/CONJ-505)] correcting issue that ended throwing "Unknown prepared statement handler given to mysqld\_stmt\_execute"
* \[[CONJ-496](https://jira.mariadb.org/browse/CONJ-496)] return rounded numeric when querying on a decimal field in place of throwing an exception for compatibility

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formid="4316" formId="4316" %}
