Bugs fixed:
The configuration property
sessionVariablesnow permits you to specify variables that start with the “@” sign. (Bug#13453)URL configuration parameters do not permit “
&” or “=” in their values. The JDBC driver now parses configuration parameters as if they are encoded using the application/x-www-form-urlencoded format as specified byjava.net.URLDecoder(http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLDecoder.html).If the “
%” character is present in a configuration property, it must now be represented as%25, which is the encoded form of “%” when using application/x-www-form-urlencoded encoding. (Bug#13453)Workaround for Bug#13374:
ResultSet.getStatement()on closed result set returnsNULL(as per JDBC 4.0 spec, but not backward-compatible). Set the connection propertyretainStatementAfterResultSetClosetotrueto be able to retrieve aResultSet's statement after theResultSethas been closed using.getStatement()(the default isfalse, to be JDBC-compliant and to reduce the chance that code using JDBC leaksStatementinstances). (Bug#13277)ResultSetMetaDatafromStatement.getGeneratedKeys()caused aNullPointerExceptionto be thrown whenever a method that required a connection reference was called. (Bug#13277)Backport of
VAR[BINARY|CHAR] [BINARY]types detection from 5.0 branch. (Bug#13277)Fixed
NullPointerExceptionwhen convertingcatalogparameter in manyDatabaseMetaDataMethodstobyte[]s (for the result set) when the parameter isnull. (nullis not technically permitted by the JDBC specification, but we have historically permitted it). (Bug#13277)Backport of
Fieldclass,ResultSetMetaData.getColumnClassName(), andResultSet.getObject(int)changes from 5.0 branch to fix behavior surroundingVARCHAR BINARY/VARBINARYand related types. (Bug#13277)Read response in
MysqlIO.sendFileToServer(), even if the local file can't be opened, otherwise next query issued will fail, because it is reading the response to the emptyLOAD DATA INFILEpacket sent to the server. (Bug#13277)When
gatherPerfMetricsis enabled for servers older than 4.1.0, aNullPointerExceptionis thrown from the constructor ofResultSetif the query doesn't use any tables. (Bug#13043)java.sql.Types.OTHERreturned forBINARYandVARBINARYcolumns when usingDatabaseMetaData.getColumns(). (Bug#12970)ServerPreparedStatement.getBinding()now checks if the statement is closed before attempting to reference the list of parameter bindings, to avoid throwing aNullPointerException. (Bug#12970)Tokenizer for
=in URL properties was causingsessionVariables=....to be parameterized incorrectly. (Bug#12753)cp1251incorrectly mapped towin1251for servers newer than 4.0.x. (Bug#12752)getExportedKeys()(Bug#12541)Specifying a catalog works as stated in the API docs. (Bug#12541)
Specifying
NULLmeans that catalog will not be used to filter the results (thus all databases will be searched), unless you've setnullCatalogMeansCurrent=truein your JDBC URL properties. (Bug#12541)getIndexInfo()(Bug#12541)getProcedures()(and thus indirectlygetProcedureColumns()) (Bug#12541)getImportedKeys()(Bug#12541)Specifying
""means “current” catalog, even though this isn't quite JDBC spec compliant, it is there for legacy users. (Bug#12541)getCrossReference()(Bug#12541)Added
Connection.isMasterConnection()for clients to be able to determine if a multi-host master/slave connection is connected to the first host in the list. (Bug#12541)getColumns()(Bug#12541)Handling of catalog argument in
DatabaseMetaData.getIndexInfo(), which also means changes to the following methods inDatabaseMetaData:getBestRowIdentifier()getColumns()getCrossReference()getExportedKeys()getImportedKeys()getIndexInfo()getPrimaryKeys()getProcedures()(and thus indirectlygetProcedureColumns())getTables()
The
catalogargument in all of these methods now behaves in the following way:Specifying
NULLmeans that catalog will not be used to filter the results (thus all databases will be searched), unless you've setnullCatalogMeansCurrent=truein your JDBC URL properties.Specifying
""means “current” catalog, even though this isn't quite JDBC spec compliant, it is there for legacy users.Specifying a catalog works as stated in the API docs.
Made
Connection.clientPrepare()available from “wrapped” connections in thejdbc2.optionalpackage (connections built byConnectionPoolDataSourceinstances).
getBestRowIdentifier()(Bug#12541)Made
Connection.clientPrepare()available from “wrapped” connections in thejdbc2.optionalpackage (connections built byConnectionPoolDataSourceinstances). (Bug#12541)getTables()(Bug#12541)getPrimaryKeys()(Bug#12541)Connection.prepareCall()is database name case-sensitive (on Windows systems). (Bug#12417)explainSlowQuerieshangs with server-side prepared statements. (Bug#12229)Properties shared between master and slave with replication connection. (Bug#12218)
Geometry types not handled with server-side prepared statements. (Bug#12104)
maxPerformance.propertiesmis-spells “elideSetAutoCommits”. (Bug#11976)ReplicationConnectionwon't switch to slave, throws “Catalog can't be null” exception. (Bug#11879)Pstmt.setObject(...., Types.BOOLEAN)throws exception. (Bug#11798)Escape tokenizer doesn't respect stacked single quotation marks for escapes. (Bug#11797)
GEOMETRYtype not recognized when using server-side prepared statements. (Bug#11797)Foreign key information that is quoted is parsed incorrectly when
DatabaseMetaDatamethods use that information. (Bug#11781)The
sendBlobChunkSizeproperty is now clamped tomax_allowed_packetwith consideration of stream buffer size and packet headers to avoidPacketTooBigExceptionswhenmax_allowed_packetis similar in size to the defaultsendBlobChunkSizewhich is 1M. (Bug#11781)CallableStatement.clearParameters()now clears resources associated withINOUT/OUTPUTparameters as well asINPUTparameters. (Bug#11781)Fixed regression caused by fix for Bug#11552 that caused driver to return incorrect values for unsigned integers when those integers where within the range of the positive signed type. (Bug#11663)
Moved source code to Subversion repository. (Bug#11663)
Incorrect generation of testcase scripts for server-side prepared statements. (Bug#11663)
Fixed statements generated for testcases missing
;for “plain” statements. (Bug#11629)Spurious
!on console when character encoding isutf8. (Bug#11629)StringUtils.getBytes()doesn't work when using multi-byte character encodings and a length in characters is specified. (Bug#11614)DBMD.storesLower/Mixed/UpperIdentifiers()reports incorrect values for servers deployed on Windows. (Bug#11575)Reworked
Fieldclass,*Buffer, andMysqlIOto be aware of field lengths >Integer.MAX_VALUE. (Bug#11498)Escape processor didn't honor strings demarcated with double quotation marks. (Bug#11498)
Updated
DBMD.supportsCorrelatedQueries()to returntruefor versions > 4.1,supportsGroupByUnrelated()to returntrueandgetResultSetHoldability()to returnHOLD_CURSORS_OVER_COMMIT. (Bug#11498)Lifted restriction of changing streaming parameters with server-side prepared statements. As long as
allstreaming parameters were set before execution,.clearParameters()does not have to be called. (due to limitation of client/server protocol, prepared statements can not reset individual stream data on the server side). (Bug#11498)ResultSet.moveToCurrentRow()fails to work when preceded by a call toResultSet.moveToInsertRow(). (Bug#11190)VARBINARYdata corrupted when using server-side prepared statements and.setBytes(). (Bug#11115)Statement.getWarnings()fails with NPE if statement has been closed. (Bug#10630)Only get
char[]from SQL inPreparedStatement.ParseInfo()when needed. (Bug#10630)