Fixes bugs found since release 5.1.18.
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.
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.
Connection.changeUser()method did not check for closed connections, leading to
NullPointerExceptionerrors when this method was called on a closed connection.