Version 5.1.36 is a maintenance release of the production 5.1 branch. It is suitable for use with MySQL Server versions 5.5, and 5.6.
The files in the Maven Central Repository for each Connector/J release have been reorganized and a source artifact (
*-sources.jar
) has been added, for release 5.1.21 and after. (Bug #20283655, Bug #75335)
Results returned by
DatabaseMetaData.getCatalogs()
were not properly sorted by catalog name. (Bug #21215151)A class cast exception occurred when Connector/J was executing a streaming prepared statement in a Fabric environment. (Bug #21184949, Bug #77217)
Connector/J did not use the character set specified with the connection property
passwordCharacterEncoding
for authentication. With this fix, the property is now honored. If it is not set, Connector/J uses the value ofcharacterEncoding
instead; if even that is not set, Conenctor/J defaults to UTF-8 for the password's encoding. (Bug #20825727)A failover did not occur for a MySQL Fabric connection during the failure of a master server. It was because the state change of the Fabric connection group was not handled properly, which has been corrected by this fix. (Bug #20821888, Bug #75113)
When the
getDate()
andgetTime()
methods ofResultSet
were called to retrieve values with fractional seconds, a “bad format” error occurred. With this fix, the fractional seconds are dropped before the retrieved values are converted into aDate
orTime
object. (Bug #20804635)A
StringIndexOutOfBoundsException
occurred whengetProcedureColumns()
were trying to return ENUM or SET type procedures or functions that involved reserved words. That was caused by a problem in the parser for the functions' or procedures' CREATE statements, which this fix corrects. (Bug #20727196)At every connection, Connector/J executed a
SHOW VARIABLES WHERE
statement over a multitude of variables, which consumed a lot of time and memory. To improve the efficiency of the code, this fix replaces the statement with the more efficientSELECT @@variable
query and also implements some other related changes. (Bug #20408891, Bug #75592)getProcedures()
,getFunctions()
,getProcedureColumns()
, andgetFunctionColumns()
returned duplicate results when the connection parameternullCatalogMeansCurrent
was set to “false.” (Bug #19803348)An
UnsupportedEncodingException
during handshake gave rise to aNullPointerException
. With this fix, theNullPointerException
is no longer thrown, and a proper error message is provided by Connector/J. (Bug #18758686, Bug #72630)When using Connector/J with MySQL Fabric, the
createGroup()
method failed with aClassCastException
. (Bug #18719760, Bug #72546)Using Connector/J to connect with non-null user name and password to a MySQL Fabric server that had authentication disabled resulted in a
NullPointerException
. (Bug #18425861, Bug #72077)The change user functionality in Connector/J was dependent on Bug# 70865 of the MySQL server (for releases 5.5 and later, the server unnecessarily sends a
plugin_request_packet
for everyCOM_CHANGE_USER
packet). That dependence made thecom.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
interface fail for server versions or forks that did not have the same bug. This fix removes that dependence and makes the interface function properly, whether the server suffers Bug# 70865 or not. (Bug #17810800, Bug #70927)JDBC4MySQLPooledConnection
keeps a list ofstatementEventListener
instances namedstatementEventListeners
, which is used as monitor lock whenever thefireStatementEvent()
method is called. However, because the pooled connection'sclose()
method setstatementEventListener
to be null, if a prepared statement was closed after its holding pooled connection had already been closed, the subsequentfireStatementEvent()
call would run into aNullPointerException
. This fix prevents the problem by havingJDBC4MySQLPooledConnection
initializingstatementEventListeners
properly and never setting it to null, thus allowing it to be used all the time as a monitor lock. (Bug #16444069, Bug #62452)