Bugs fixed:
Production package doesn't include JBoss integration classes. (Bug#11411)
Removed nonsensical “costly type conversion” warnings when using usage advisor. (Bug#11411)
Fixed
PreparedStatement.setClob()not acceptingnullas a parameter. (Bug#11360)Connector/J dumping query into
SQLExceptiontwice. (Bug#11360)autoReconnectping causes exception on connection startup. (Bug#11259)Connection.setCatalog()is now aware of theuseLocalSessionStateconfiguration property, which when set totruewill prevent the driver from sendingUSE ...to the server if the requested catalog is the same as the current catalog. (Bug#11115)3-0-Compat: Compatibility with Connector/J 3.0.x functionality (Bug#11115)maxPerformance: Maximum performance without being reckless (Bug#11115)solarisMaxPerformance: Maximum performance for Solaris, avoids syscalls where it can (Bug#11115)Added
maintainTimeStatsconfiguration property (defaults totrue), which tells the driver whether or not to keep track of the last query time and the last successful packet sent to the server's time. If set tofalse, removes two syscalls per query. (Bug#11115)VARBINARYdata corrupted when using server-side prepared statements andResultSet.getBytes(). (Bug#11115)Added the following configuration bundles, use one or many using the
useConfigsconfiguration property:maxPerformance: Maximum performance without being recklesssolarisMaxPerformance: Maximum performance for Solaris, avoids syscalls where it can3-0-Compat: Compatibility with Connector/J 3.0.x functionality
Try to handle
OutOfMemoryErrorsmore gracefully. Although not much can be done, they will in most cases close the connection they happened on so that further operations don't run into a connection in some unknown state. When an OOM has happened, any further operations on the connection will fail with a “Connection closed” exception that will also list the OOM exception as the reason for the implicit connection close event. (Bug#10850)Setting
cachePrepStmts=truenow causes theConnectionto also cache the check the driver performs to determine if a prepared statement can be server-side or not, as well as caches server-side prepared statements for the lifetime of a connection. As before, theprepStmtCacheSizeparameter controls the size of these caches. (Bug#10850)Don't send
COM_RESET_STMTfor each execution of a server-side prepared statement if it isn't required. (Bug#10850)0-length streams not sent to server when using server-side prepared statements. (Bug#10850)
Driver detects if you're running MySQL-5.0.7 or later, and does not scan for
LIMIT ?[,?]in statements being prepared, as the server supports those types of queries now. (Bug#10850)Reorganized directory layout. Sources now are in
srcfolder. Don't pollute parent directory when building, now output goes to./build, distribution goes to./dist. (Bug#10496)Added support/bug hunting feature that generates
.sqltest scripts toSTDERRwhenautoGenerateTestcaseScriptis set totrue. (Bug#10496)SQLExceptionis thrown when using propertycharacterSetResultswithcp932oreucjpms. (Bug#10496)The data type returned for
TINYINT(1)columns whentinyInt1isBit=true(the default) can be switched betweenTypes.BOOLEANandTypes.BITusing the new configuration propertytransformedBitIsBoolean, which defaults tofalse. If set tofalse(the default),DatabaseMetaData.getColumns()andResultSetMetaData.getColumnType()will returnTypes.BOOLEANforTINYINT(1)columns. Iftrue,Types.BOOLEANwill be returned instead. Regardless of this configuration property, iftinyInt1isBitis enabled, columns with the typeTINYINT(1)will be returned asjava.lang.Booleaninstances fromResultSet.getObject(...), andResultSetMetaData.getColumnClassName()will returnjava.lang.Boolean. (Bug#10485)SQLExceptionthrown when retrievingYEAR(2)withResultSet.getString(). The driver will now always treatYEARtypes asjava.sql.Datesand return the correct values forgetString(). Alternatively, theyearIsDateTypeconnection property can be set tofalseand the values will be treated asSHORTs. (Bug#10485)Driver doesn't support
{?=CALL(...)}for calling stored functions. This involved adding support for function retrieval toDatabaseMetaData.getProcedures()andgetProcedureColumns()as well. (Bug#10310)Unsigned
SMALLINTtreated as signed forResultSet.getInt(), fixed all cases forUNSIGNEDinteger values and server-side prepared statements, as well asResultSet.getObject()forUNSIGNED TINYINT. (Bug#10156)Made
ServerPreparedStatement.asSql()work correctly so auto-explain functionality would work with server-side prepared statements. (Bug#10155)Double quotation marks not recognized when parsing client-side prepared statements. (Bug#10155)
Made JDBC2-compliant wrappers public to enable access to vendor extensions. (Bug#10155)
DatabaseMetaData.supportsMultipleOpenResults()now returnstrue. The driver has supported this for some time, DBMD just missed that fact. (Bug#10155)Cleaned up logging of profiler events, moved code to dump a profiler event as a string to
com.mysql.jdbc.log.LogUtilsso that third parties can use it. (Bug#10155)Made
enableStreamingResults()visible oncom.mysql.jdbc.jdbc2.optional.StatementWrapper. (Bug#10155)Actually write manifest file to correct place so it ends up in the binary jar file. (Bug#10144)
Added
createDatabaseIfNotExistproperty (default isfalse), which will cause the driver to ask the server to create the database specified in the URL if it doesn't exist. You must have the appropriate privileges for database creation for this to work. (Bug#10144)Memory leak in
ServerPreparedStatementifserverPrepare()fails. (Bug#10144)com.mysql.jdbc.PreparedStatement.ParseInfodoes unnecessary call totoCharArray(). (Bug#9064)Driver now correctly uses CP932 if available on the server for Windows-31J, CP932 and MS932 java encoding names, otherwise it resorts to SJIS, which is only a close approximation. Currently only MySQL-5.0.3 and newer (and MySQL-4.1.12 or .13, depending on when the character set gets backported) can reliably support any variant of CP932.
Overhaul of character set configuration, everything now lives in a properties file.