Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Release Notes for the MariaDB Connector/J 1.3 series
Download | Release Notes | Changelog |
Release date: 23 Mar 2016
MariaDB Connector/J 1.3.7 is a Stable (GA) release.
For a list of all changes made in this release, with links to detailed information on each push, see the changelog.
This version is a bugfix / performance improvement release.
: Server prepare statement failover uses the associated connection
Performance improvements :
using directly the query.getByte("UTF-8") array to avoid recreating a new array
rewriteStatement improvement (parsing query to verfy that query can be rewritten + performance)
: getString on '0000-00-00' date was returning npe.
PrepareStatement now doesn't lose decimal when using Float or Double object
Local file upload correction when using useCompression option
CONJ-243 : correction getString on tinyInt false value
failover : Assure connection when a failover append during connection initialization :
CONJ-245: Check connection status before executing query
Connection.prepareStatement() taking column indexes or names return generated keys
CONJ-246: permit aurora single node cluster.
To permit development/integration on a single-node cluster, only one host can be defined with aurora configuration :
Driver will try to reconnect automatically after a failover.
Download | Release Notes | Changelog |
Release date: 12 Jan 2016
MariaDB Connector/J 1.3.4 is a Stable (GA) release.
For a list of all changes made in this release, with links to detailed information on each push, see the changelog.
This version is a bugfix release
Failover improvements (reconnection implementation evolution, thread handling ...)
: Correction on using getInt on a signed smallInt negative value on prepareStatement
: PrepareStatement prepare exception handling
: Closing a close statement does not throw an Exception anymore
: Permit commit when in autocommit mode
: Permit using Connection.setReadOnly(true) during a transaction
On a master/slave cluster, the driver uses 2 underlying connections: one to a master instance, one to a slave instance. When one of the connections fails, if the driver needs it right away, it will create a new connection immediately before re-executing the query, if possible.
If the failed connection is not needed immediately, this driver will subscribe to the "failover reconnection" that will be handled in other threads. Failover threads will attempt to create a new connection to replace a failing one, so the interruption is minimal for the queries in progress. When the client asks to use a failed connection, the new connection created by the failover thread will replace the failed one.
Example: after a failure on a slave connection, readonly operations are temporary executed on the master connection to avoid interruption on the client side. The failover thread will then create a new slave connection that will replace the failed one. The next query will use the new slave connection.
A pool of threads is initialized when using a master/slave configuration. The pool size evolves according to the number of connections.
More information on GitHub here:
jdbc:(mysql|mariadb):aurora://<hostDescription>/[database][?<key1>=<value1>[&<key2>=<value2>]]CONJ-221: preparedStatement : Error when using statement setObject(int, object, sqlType) with object with Long type and sql type Types.BIGINT
CONJ-219: Correcting Datasource parameter handling.
CONJ-222: INSERT ... SELECT are now not rewritten when option rewriteBatchedStatements is set.
CONJ-223: MetaData.getParameterCount() on prepareStatement now return correct result.
: prepareStatement : setCharacterStream and setBlob possible IndexOutOfBoundsException depending on stream length.
Code cleaned to avoid connection leak
Bug correction when using Resultset.getDate on a timestamp field
With the CONJ-228 evolution, some behavior has changed : Exceptions are always thrown if any read data truncation happens.
SmallInt data type signed range is -32768 to 32767. The unsigned range is 0 to 65535.
Signed range is similar to the Java short primitive type.
A ResultSet.getShort() on a unsigned smallint value of 40000 will now throw an
SQLException. (the previous version was returning the 32767 value).
This value will be available by using a resultset.getInt().
Download | Release Notes | Changelog |
Release date: 16 Nov 2015
MariaDB Connector/J 1.3.0 is a Stable (GA) release.
For a list of all changes made in this release, with links to detailed information on each push, see the changelog.
This release includes the following major enhancements :
Prepared statement on server side.
Improving memory footprint
New Date/Time/Timestamps implementation
New failover options
A prepared statement is a feature used to execute the same (or similar) SQL statements repeatedly with high efficiency.
This functionality is now executed on the server side.
For example:
When executing connection.prepareStatement the query will be sent to the
server. The server will return a statement ID.
When executing executeBatch, only this statement ID will be sent with the
query parameter.
This improves performance when many queries are to be executed.
The following new parameters have been added :
The prepared statement will be cached according to the above parameters.
The memory footprint has been improved for query text and especially for prepared statements.
A new parameter is added :
There is no change when the parameter useLegacyDatetimeCode is not specified
or is true (it is true by default). When this parameter is set tofalse in the JDBC connection string, the new implementation is used.
Therefore, the time zone of the server will be used, taking into account the
time changes.
Example with a particular timezone:
If Connector/Java is using the "Europe/Paris" timezone, server "Canada/Atlantic" (UTC recommended, but not mandatory).
Using useLegacyDatetimeCode=false or not will return the same result :
The difference will be on the saved data :
with useLegacyDatetimeCode=false:
with useLegacyDatetimeCode=true:
A new parameter is added :
When switching host to a slave (by using "connection.setReadOnly(true);" for example), if the database permit it, the connector was always setting the connection in read-only mode, so an Exception will be thrown if a data modification is done on a slave.
To improve performance, this operation will not be performed if the parameter is a assureReadOnly false (default). It's up to you to configure the slaves servers in .
A new type of failover implementation as been added : Sequential.
This permits failover WITHOUT loadbalancing.
the host will be connected in the order in which they were declared.
Example when using the jdbc url string "jdbc:mysql:replication:host1,host2,host3/test". &#xNAN;When connecting, the driver will always try first host1, and if not available host2 and following. &#xNAN;After a host fail, the driver will reconnect according to this order.
Example :
Connecting order:
trying to connect to host1. Host1 is up, the driver will use this host.
host1 fail. The driver will connect to Host2.
host2 fail. If the host1 is not blacklisted anymore (timeout configure with
the loadBalanceBlacklistTimeout parameter) the driver will try to connect
to host1, and after host3. If host1 was blacklisted, driver would connect to
host3 directly.
cachePrepStmts
Enable/disable prepared statement cache default is true
prepStmtCacheSize
Sets the number of prepared statements that the driver will cache per VM if cachePrepStmts is enabled. default is 250
prepStmtCacheSqlLimit
Maximum length of a prepared SQL statement that the driver will cache if cachePrepStmts is enabled. default is 2048
2015- 2- 29T00:45:00+0000
2015- 2- 29T01:45:00+1000
2015- 2- 28 21:45:00-3000
2015- 2- 29T01:15:00+0000
2015- 2- 29T03:15:00+2000
2015- 2- 28 22:15:00-3000
2015-03-28 21:45:00.000000
2015-03-28 22:15:00.000000
2015-03-29 01:45:00.000000
2015-03-29 03:15:00.000000
PreparedStatement pst = connection.prepareStatement("INSERT INTO exemple VALUES (?)");
int i=1000;
while(i>0) {
pst.setInt(1, i--);
pst.addBatch();
}
pst.executeBatch();TimeZone.setDefault(TimeZone.getTimeZone("Europe/Paris"));
connection.createStatement().execute("CREATE TABLE daylight (t1 TIMESTAMP(6), t2 DATETIME(6))");
PreparedStatement pst = connection.prepareStatement("INSERT INTO daylight VALUES (?, ?)");
pst.setTimestamp(1, Timestamp.valueOf("2015-03-29 01:45:00"));
pst.setTimestamp(2, Timestamp.valueOf("2015-03-29 03:15:00"));
...ResultSet res = connection.createStatement().executeQuery("SELECT * FROM daylight");
res.next();
assertEquals(res.getTimestamp(1),Timestamp.valueOf("2015-03-29 01:45:00"));
assertEquals(res.getTimestamp(2),Timestamp.valueOf("2015-03-29 01:45:00"));
res.next();
assertEquals(res.getTimestamp(1),Timestamp.valueOf("2015-03-29 03:15:00"));
assertEquals(res.getTimestamp(2),Timestamp.valueOf("2015-03-29 03:15:00"));Download | Release Notes | Changelog | About MariaDB Connector/J
Release date: 29 Feb 2016
MariaDB Connector/J 1.3.6 is a Stable (GA) release.
For a list of all changes made in this release, with links to detailed information on each push, see the changelog.
This version is a bugfix release.
: Correction of charset parameter on Statement.setCharacterStream() and setClob
: Protocol encoding correction for binary field
: Correction of error in boolean when using scala anorm string interpolation
: getBoolean() improvement (for field not normally considered as boolean). TinyInt value >= 2 are now considered as true.
: Server preparedStatement now used even for query without parameters.
: multithreading correction on possible race condition on statement.close()
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.
This page is: Copyright © 2025 MariaDB. All rights reserved.