Functionality added or changed:
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is false (i.e. Connector/J does not use server-side prepared statements).
Performance enhancement of initial character set configuration, driver will only send commands required to configure connection character set session variables if the current values on the server do not match what is required.
Bugs fixed:
Comments auomatically generated by the Hibernate framework could cause problems in the parser when using batched inserts. (Bug#25025)
When using a JDBC connection URL that is malformed, the
NonRegisteringDriver.getPropertyInfo
method will throw a Null Pointer Exception (NPE) error. (Bug#22628)
Using DatabaseMetaData.getSQLKeywords()
does not return a consistent list of reserved keywords. (Bug#24794)
Specifying US-ASCII
as the character set
in a connection to a MySQL 4.1 or newer server does not map
correctly. (Bug#24840)
Storing a java.util.Date
objection in a
BLOB
column would not be serialized
correctly during setObject
. (Bug#25787)
A query execution which timed out dod not always thow a
MySQLTimeoutException
. (Bug#25836)
A connection error would occur when connecting to a MySQL server with certai character sets. Some collations/character sets reported as "unknown" (specifically cias variants of existing character sets), and inability to override the detected server character set. (Bug#23645)
Using setFetchSize()
breaks prepared
SHOW
and other commands. (Bug#24360)
Using DATETIME
columnd would result in
time shifts when useServerPrepStmts
was
true. (Bug#24344)
Inconsistency between getSchemas
and
INFORMATION_SCHEMA
. (Bug#23304)
When using the rewriteBatchedStatements
connection option with
PreparedState.executeBatch()
an internal
memory leak would occur. (Bug#25073)
Fixed issue where field-level for metadata from
DatabaseMetaData
when using
INFORMATION_SCHEMA
didn't have references
to current connections, sometimes leading to
NullPointerExceptions
when intropsecting
them via ResultSetMetaData
.
Connector/J now returns a better error message when server doesn't return enough information to determine stored procedure/function parameter types. (Bug#24065)
When using server-side prepared statements and timestamp columns, value would be incorrectly populated (with nanoseconds, not microseconds). (Bug#21438)
Timer instance used for
Statement.setQueryTimeout()
created
per-connection, rather than per-VM, causing memory leak.
(Bug#25514)
Results sets from UPDATE
statements with
multi-statement queries would cause an
SQLException
error. (Bug#25009)
StringUtils.indexOfIgnoreCaseRespectQuotes()
isn't case-insensitive on the first character of the target.
This bug also affected
rewriteBatchedStatements
functionality
when prepared statements did not use uppercase for the
VALUES
clause. (Bug#25047)
Some exceptions thrown out of
StandardSocketFactory
were needlessly
wrapped, obscuring their true cause, especially when using
socket timeouts. (Bug#21480)
DatabaseMetaData.getSchemas()
doesn't
return a TABLE_CATALOG
column. (Bug#23303)
EscapeProcessor
gets confused by multiple
backslashes. We now push the responsibility of syntax errors
back on to the server for most escape sequences. (Bug#25399)
INOUT
parameters in
CallableStatements
get doubly-escaped.
(Bug#25379)
Connector/J would ignore the
socketFactory
property, making it
difficult to use the
NamedPipeSocketFactory
. (Bug#26326)