Bugs fixed:
Fixed
ServerPreparedStatementto read prepared statement metadata off the wire, even though it is currently a placeholder instead of usingMysqlIO.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 withServerPreparedStatementsthrowingArrayIndexOutOfBoundExceptions. (Bug#5032)Added three ways to deal with all-zero datetimes when reading them from a
ResultSet:exception(the default), which throws anSQLExceptionwith an SQLState ofS1009;convertToNull, which returnsNULLinstead of the date; andround, which rounds the date to the nearest closest value which is'0001-01-01'. (Bug#5032)The driver is more strict about truncation of numerics on
ResultSet.get*(), and will throw anSQLExceptionwhen truncation is detected. You can disable this by settingjdbcCompliantTruncationtofalse(it is enabled by default, as this functionality is required for JDBC compliance). (Bug#5032)You can now use URLs in
LOAD DATA LOCAL INFILEstatements, and the driver will use Java's built-in handlers for retreiving the data and sending it to the server. This feature is not enabled by default, you must set theallowUrlInLocalInfileconnection property totrue. (Bug#5032)ResultSet.getObject()doesn't return typeBooleanfor pseudo-bit types from prepared statements on 4.1.x (shortcut for avoiding extra type conversion when using binary-encoded result sets obscured test ingetObject()for “pseudo” bit type). (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)ServerPreparedStatementsdealing with return ofDECIMALtype 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 primatives if a previousnullwas returned. (Bug#4689)Optimized integer number parsing, enable “old” slower integer parsing using JDK classes using
useFastIntParsing=falseproperty. (Bug#4642)Added
useOnlyServerErrorMessagesproperty, 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 totrueby default. (Bug#4642)ServerPreparedStatement.execute*()sometimes threwArrayIndexOutOfBoundsExceptionwhen 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()andgetTableTypes()for views, which are now available in MySQL server 5.0.x. (Bug#4510)ResultSet.getObject()returns wrong type for strings when using prepared statements. (Bug#4482)Calling
MysqlPooledConnection.close()twice (even though an application error), caused NPE. Fixed. (Bug#4482)