Fixes bugs found since release 5.1.18.
For a UTF-8 table using a collation other than the default (
utf8_general_ci), the precision of the
ResultSetMetaDatacould be different from the precision specified in the
CREATE TABLEstatement. The fix corrects the return value from
This fix changes the behavior of some connection string parameters.
useDynamicCharsetInfono longer has any effect. With the setting
cacheServerConfiguration=true, the cached settings also include the results of the
SHOW CHARACTER SETstatement. (Bug #13495590, Bug #63456)
Added support for pluggable authentication. via the
com.mysql.jdbc.AuthenticationPlugininterface (which extends the standard “extension” interface). Examples are in
testsuite.regression.ConnectionRegressionTest.This feature introduces three new connection properties:
authenticationPluginsdefines a comma-delimited list of classes that implement
com.mysql.jdbc.AuthenticationPluginand are used for authentication unless disabled by the
disabledAuthenticationPluginsdefines a comma-delimited list of classes implementing
com.mysql.jdbc.AuthenticationPluginor mechanisms, i.e.
mysql_native_password. The authentication plugins or mechanisms cannot be used for authentication. Authentication will fail if it requires one of these classes. It is an error to disable the default authentication plugin, either the one named by
defaultAuthenticationPluginproperty or the hardcoded one if
defaultAuthenticationPluginproperty is not set.
defaultAuthenticationPlugindefines the name of a class implementing
com.mysql.jdbc.AuthenticationPlugin, which is used as the default authentication plugin. It is an error to use a class that is not listed in
authenticationPluginsand is not one of the built-in plugins. It is an error to set as default a plugin that is disabled by being listed in the
disabledAuthenticationPluginsproperty. It is an error to set this value to null or the empty string; there must be at least one valid default authentication plugin specified for the connection, meeting all the constraints listed above.
Performance: An unnecessary call to
bind()during socket operations could limit scalability on some platforms. (Bug #13875070, Bug #63811)
setMaxRowswas not correctly processed during metadata collection for client-side prepared statements, causing the entire result set to be fetched and possibly leading to an out-of-memory error. (Bug #13839395, Bug #64621)
A problem with processing escape sequences (in
com.mysql.jdbc.EscapeProcessor#escapeSQL) could cause certain statements to fail. For example, a
CREATE TABLEstatement with a clause such as
CONSTRAINT `fk_`was not parsed correctly. (Bug #13612316, Bug #63526)
sjischaracter set was incorrectly mapped to
MS392, which was in turn mapped to
cp932, resulting in garbled characters in some cases. In Connector/J 5.1.19, the mappings of character sets and collations were refactored to avoid such multi-step mappings. (Bug #13589875)
Underprivileged execution of stored procedures fixed. (Bug #13508993, Bug #61203)
A combination of failover connections, proxied or prepared statements, and database connection pool could cause a memory leak due to improper implementation of
equals(). (Bug #13441718, Bug #63284)
com.mysql.jdbc.ResultSetRow.getTimestampFast()did not account for all valid
TIMElengths. (Bug #60582, Bug #16592635)
Connection.changeUser()method did not check for closed connections, leading to
NullPointerExceptionerrors when this method was called on a closed connection.
Reduced the memory overhead for server-side prepared statements. Each prepared statement allocated a 4K buffer for converting streams. Now this allocation is skipped when no
set*Stream()methods have been used.