MySQL Connector/J 5.1 Release Notes

4.12 Changes in MySQL Connector/J 3.1.4 (2004-09-04)

Bugs Fixed

  • You can now use URLs in LOAD DATA LOCAL statements, and the driver will use Java's built-in handlers for retrieving the data and sending it to the server. This feature is not enabled by default, you must set the allowUrlInLocalInfile connection property to true. (Bug #5032)

  • Use com.mysql.jdbc.Message's classloader when loading resource bundle, should fix sporadic issues when the caller's classloader can't locate the resource bundle. (Bug #5032)

  • The driver is more strict about truncation of numerics on ResultSet.get*(), and will throw an SQLException when truncation is detected. You can disable this by setting jdbcCompliantTruncation to false (it is enabled by default, as this functionality is required for JDBC compliance). (Bug #5032)

  • Fixed ServerPreparedStatement to read prepared statement metadata off the wire, even though it is currently a placeholder instead of using MysqlIO.clearInputStream() which didn't work at various times because data wasn't available to read from the server yet. This fixes sporadic errors users were having with ServerPreparedStatements throwing ArrayIndexOutOfBoundExceptions. (Bug #5032)

  • Added three ways to deal with all-zero datetimes when reading them from a ResultSet: exception (the default), which throws an SQLException with an SQLState of S1009; convertToNull, which returns NULL instead of the date; and round, which rounds the date to the nearest closest value which is '0001-01-01'. (Bug #5032)

  • ResultSet.getObject() doesn't return type Boolean for pseudo-bit types from prepared statements on 4.1.x (shortcut for avoiding extra type conversion when using binary-encoded result sets obscured test in getObject() for pseudo bit type). (Bug #5032)

  • ServerPreparedStatements dealing with return of DECIMAL type don't work. (Bug #5012)

  • Track packet sequence numbers if enablePacketDebug=true, and throw an exception if packets received out-of-order. (Bug #4689)

  • ResultSet.wasNull() does not work for primitives if a previous null was returned. (Bug #4689)

  • Optimized integer number parsing, enable old slower integer parsing using JDK classes using useFastIntParsing=false property. (Bug #4642)

  • Added useOnlyServerErrorMessages property, which causes message text in exceptions generated by the server to only contain the text sent by the server (as opposed to the SQLState's standard description, followed by the server's error message). This property is set to true by default. (Bug #4642)

  • ServerPreparedStatement.execute*() sometimes threw ArrayIndexOutOfBoundsException when unpacking field metadata. (Bug #4642)

  • Connector/J 3.1.3 beta does not handle integers correctly (caused by changes to support unsigned reads in Buffer.readInt() -> Buffer.readShort()). (Bug #4510)

  • Added support in DatabaseMetaData.getTables() and getTableTypes() for views, which are now available in MySQL server 5.0.x. (Bug #4510)

  • Calling MysqlPooledConnection.close() twice (even though an application error), caused NPE. Fixed. (Bug #4482)

  • ResultSet.getObject() returns wrong type for strings when using prepared statements. (Bug #4482)