Bugs fixed:
Added support for Connector/MXJ integration using url subprotocol
jdbc:mysql:mxj://.... (Bug#14729)Idle timeouts cause
XAConnectionsto whine about rolling themselves back. (Bug#14729)When fix for Bug#14562 was merged from 3.1.12, added functionality for
CallableStatement's parameter metadata to return correct information for.getParameterClassName(). (Bug#14729)Added service-provider entry to
META-INF/services/java.sql.Driverfor JDBC-4.0 support. (Bug#14729)Fuller synchronization of
Connectionto avoid deadlocks when using multithreaded frameworks that multithread a single connection (usually not recommended, but the JDBC spec permits it anyways), part of fix to Bug#14972). (Bug#14729)Moved all
SQLExceptionconstructor usage to a factory inSQLError(ground-work for JDBC-4.0SQLState-based exception classes). (Bug#14729)Removed Java5-specific calls to
BigDecimalconstructor (when result set value is'',(int)0was being used as an argument indirectly using method return value. This signature doesn't exist prior to Java5.) (Bug#14729)Implementation of
Statement.cancel()andStatement.setQueryTimeout(). Both require MySQL-5.0.0 or newer server, require a separate connection to issue theKILL QUERYstatement, and in the case ofsetQueryTimeout()creates an additional thread to handle the timeout functionality.Note: Failures to cancel the statement for
setQueryTimeout()may manifest themselves asRuntimeExceptionsrather than failing silently, as there is currently no way to unblock the thread that is executing the query being cancelled due to timeout expiration and have it throw the exception instead. (Bug#14729)Return "[VAR]BINARY" for
RSMD.getColumnTypeName()when that is actually the type, and it can be distinguished (MySQL-4.1 and newer). (Bug#14729)Attempt detection of the MySQL type
BINARY(it is an alias, so this isn't always reliable), and use thejava.sql.Types.BINARYtype mapping for it.Added unit tests for
XADatasource, as well as friendlier exceptions for XA failures compared to the "stock"XAException(which has no messages).If the connection
useTimezoneis set totrue, then also respect time zone conversions in escape-processed string literals (for example,"{ts ...}"and"{t ...}").Do not permit
.setAutoCommit(true), or.commit()or.rollback()on an XA-managed connection as per the JDBC specification.XADataSourceimplemented (ported from 3.2 branch which won't be released as a product). Usecom.mysql.jdbc.jdbc2.optional.MysqlXADataSourceas your datasource class name in your application server to utilize XA transactions in MySQL-5.0.10 and newer.Moved
-bin-g.jarfile into separatedebugsubdirectory to avoid confusion.Return original column name for
RSMD.getColumnName()if the column was aliased, alias name for.getColumnLabel()(if aliased), and original table name for.getTableName(). Note this only works for MySQL-4.1 and newer, as older servers don't make this information available to clients.Setting
useJDBCCompliantTimezoneShift=true(it is not the default) causes the driver to use GMT for allTIMESTAMP/DATETIMEtime zones, and the current VM time zone for any other type that refers to time zones. This feature can not be used whenuseTimezone=trueto convert between server and client time zones.PreparedStatement.setString()didn't work correctly whensql_modeon server containedNO_BACKSLASH_ESCAPESand no characters that needed escaping were present in the string.Add one level of indirection of internal representation of
CallableStatementparameter metadata to avoid class not found issues on JDK-1.3 forParameterMetadatainterface (which doesn't exist prior to JDBC-3.0).