The MariaDB Java Client 1.1.1 has been released. You can download it here.

See the Release Notes and Changelog for detailed information on this release and the About the MariaDB Java Client page in the AskMonty Knowledgebase for general information about the client.

New functionality in this release

  • Implement tcpAbortiveClose option, for “hard” socket close (CONJ-27)
    • This option can be used in environments where connections are created and closed in rapid succession. Often, it is not possible to create a socket in such environment after a while, since all local “ephemeral” ports are used up by TCP connections in TCP_WAIT state. Using tcpAbortiveClose works around this problem by resetting TCP connections rather (abortive or hard close) than doing an orderly close. It is accomplished by using socket.setSoLinger(true,0) for abortive close.

Bugs fixed in this release

  • MySQLStatement will now indicate there are no more results by returning -1 from getUpdateCount() and null from getResultSet(),as mandated by the standard (CONJ-14)
  • Introduced nullCatalogMeansCurrent parameter for compatibly with ConnectorJ, and make it default (CONJ-16)
    • Prior to this change, DatabaseMetadata.getTables() or other methods of DatabaseMetaData that accept catalog names and return result sets would treat null as prescribed by the JDBC standard (null means no restriction which catalog is used). This behavior is now changed for the sake of compatibility. Starting with 1.1.1 , null for catalog name will mean current catalog. To get JDBC standard behavior, one needs to set nullCatalogMeansCurrent=false.
  • DatabaseMedataData.getColumns() returned incorrect values in the “COLUMN_SIZE” column for character data.(CONJ-15))
    • Prior to the change, octet size was returned (length in bytes). Depending on the character set used, it could be 3 times bigger than the length in characters that was specified by CREATE or ALTER table. This behavior is corrected in 1.1.1
  • DatabaseMetaData.getColumns() always handled MySQL YEAR datatype as SMALLINT. (CONJ-19)
    • The behavior is now fixed and getColumns returns either DATE or SMALLINT depending on how the ‘yearIsDateType’ parameter is set.
  • ResultSetMetaData.getColumnName() returned an empty string in special cases (CONJ-17)
    • ResultSetMetaData.getColumnName() returned and empty string for “non-columns” in a result set (functions, aggregates like count(*), and so on). The fix is to return the column label to be returned if the column name is empty.
  • Ensure that getObject() returns byte array for CHAR BINARY.(CONJ-20)
    • Also make sure that getColumnType(),getColumnClassName(),getColumnTypeName() return values indicate BINARY for fixed binary type.
  • JVM does not exit if statement timeout is used.(CONJ-23)
    • Constructor for Timer was corrected to ensure that the Timer thread has type background thread. Thus Timer won’t prevent JVM from exiting.
  • Calling first() on “streaming” result set and using the result set afterwards generated NullPointerException (CONJ-24)
    • Now a SQLException is thrown early on, in the first() call, since streaming results sets are not scrollable.
  • Connection.close() hangs if there is an open streaming result set, and next() was not called on this result set (CONJ-25)

 

  • Pavel Cibulka

    Hi, I have already looked into MariaDB Java Client. Please upload this library into maven repository. I’m curious. Why have you chose Drizzle JDBC as the base instead of MySQL J/Connector? Do you plan implement MySQL J/Connector optional URL parameters like cacheServerConfiguration, useLocalSessionState, rewriteBatchedStatements, useAffectedRows.

    Thanks for great work, Pavel Cibulka

    • http://www.facebook.com/vladislav.vaintroub Vladislav Vaintroub

      We can’t take MySQL Connector/J as the base, it is GPL ,derived work can be GPL only. There were users who wanted to have more liberal license, thus ConnectorJ was not an option. As for optional URL parameters, currently there are no plans to introduce new ones, unless they are found to be important. Of your 4 listed parameters perhaps rewriteBatchedStatements can be of any interest, and needs to be benchmarked, but anything else does not seem very interesting relevant on the first glance? I could use some help with the “upload to mven repository”. I tried to read how it is done, but found myself asleep after a minute or two when trying:) It would work much better and faster if you or any other maven-knowlegable person can tell me how it is done on #maria IRC channel on FreeNode. Thanks!

  • http://www.facebook.com/sriwahono Sri Wahono

    Is MariaDB client library for C support Android and iOS? thanks

    • http://daniel-bartholomew.com/ Daniel Bartholomew

      Approve.

      • http://www.facebook.com/sriwahono Sri Wahono

        Sorry, I ask in wrong place, this article is Java client library.
        Thanks Daniel, I assume you answer “Approve” is will be supported in the future? right? When?
        Thanks

        • http://daniel-bartholomew.com/ Daniel Bartholomew

          Sorry, the “approve” message was a glitch with the approve-comments-by-email system, for some reason it posted that instead of approving your comment as it was supposed to do.

          I do not know about the client library for C and support for Android and IOS.