Functionality added or changed:
blobsAreStrings
: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BY
clauses. Defaults to false.Added two configuration parameters:
blobsAreStrings
: Should the driver always treat BLOBs as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BY
clauses. Defaults to false.functionsNeverReturnBlobs
: Should the driver always treat data from functions returningBLOBs
as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BY
clauses. Defaults to false.
functionsNeverReturnBlobs
: Should the driver always treat data from functions returningBLOBs
as Strings. Added specifically to work around dubious metadata returned by the server forGROUP BY
clauses. Defaults to false.XAConnections now start in auto-commit mode (as per JDBC-4.0 specification clarification).
Driver will now fall back to sane defaults for
max_allowed_packet
andnet_buffer_length
if the server reports them incorrectly (and will log this situation atWARN
level, since it is actually an error condition).
Bugs fixed:
Connections established using URLs of the form
jdbc:mysql:loadbalance://
weren't doing failover if they tried to connect to a MySQL server that was down. The driver now attempts connections to the next "best" (depending on the load balance strategy in use) server, and continues to attempt connecting to the next "best" server every 250 milliseconds until one is found that is up and running or 5 minutes has passed.If the driver gives up, it will throw the last-received
SQLException
. (Bug#31053)setObject(int, Object, int, int)
delegate in PreparedStatmentWrapper delegates to wrong method. (Bug#30892)NPE with null column values when
padCharsWithSpace
is set to true. (Bug#30851)Collation on
VARBINARY
column types would be misidentified. A fix has been added, but this fix only works for MySQL server versions 5.0.25 and newer, since earlier versions didn't consistently return correct metadata for functions, and thus results from subqueries and functions were indistinguishable from each other, leading to type-related bugs. (Bug#30664)An
ArithmeticException
orNullPointerException
would be raised when the batch had zero members andrewriteBatchedStatements=true
whenaddBatch()
was never called, orexecuteBatch()
was called immediately afterclearBatch()
. (Bug#30550)Closing a load-balanced connection would cause a
ClassCastException
. (Bug#29852)Connection checker for JBoss didn't use same method parameters using reflection, causing connections to always seem "bad". (Bug#29106)
DatabaseMetaData.getTypeInfo()
for the typesDECIMAL
andNUMERIC
will return a precision of 254 for server versions older than 5.0.3, 64 for versions 5.0.3 to 5.0.5 and 65 for versions newer than 5.0.5. (Bug#28972)CallableStatement.executeBatch()
doesn't work when connection propertynoAccessToProcedureBodies
has been set totrue
.The fix involves changing the behavior of
noAccessToProcedureBodies
,in that the driver will now report all paramters asIN
paramters but permit callers to call registerOutParameter() on them without throwing an exception. (Bug#28689)When a connection is in read-only mode, queries that are wrapped in parentheses were incorrectly identified DML statements. (Bug#28256)
UNSIGNED
types not reported usingDBMD.getTypeInfo()
, and capitalization of type names is not consistent betweenDBMD.getColumns()
,RSMD.getColumnTypeName()
andDBMD.getTypeInfo()
.This fix also ensures that the precision of
UNSIGNED MEDIUMINT
andUNSIGNED BIGINT
is reported correctly usingDBMD.getColumns()
. (Bug#27916)DatabaseMetaData.getColumns()
doesn't containSCOPE_*
orIS_AUTOINCREMENT
columns. (Bug#27915)Schema objects with identifiers other than the connection character aren't retrieved correctly in
ResultSetMetadata
. (Bug#27867)Cached metadata with
PreparedStatement.execute()
throwsNullPointerException
. (Bug#27412)Connection.getServerCharacterEncoding()
doesn't work for servers with version >= 4.1. (Bug#27182)The automated SVN revisions in
DBMD.getDriverVersion()
. The SVN revision of the directory is now inserted into the version information during the build. (Bug#21116)Specifying a "validation query" in your connection pool that starts with "/* ping */" _exactly_ will cause the driver to instead send a ping to the server and return a fake result set (much lighter weight), and when using a ReplicationConnection or a LoadBalancedConnection, will send the ping across all active connections.