2.4 Changes in MySQL Connector/C 6.1.3 (2013-12-27)

Security Notes

A new MYSQL_OPT_SSL_ENFORCE option is
available for the
mysql_options() C API function
to indicate whether to require the connection to use SSL. If
enabled, an encrypted connection is attempted. If an encrypted
connection cannot be established, the connection attempt fails.

Some dependencies between client-side plugin header files were
removed:

The MYSQL_PLUGIN_EXPORT macro required by
plugin declarations is now declared directly in
mysql/client_plugin.h instead of
getting the definition from
mysql/plugin.h. That macro was the only
thing required by client-side plugins and declared in
server-side header mysql/plugin.h, so
including mysql/client_plugin.h in an
application no longer requires the application to also
include mysql/plugin.h.

mysql/plugin_trace.h no longer uses
C_MODE_START or
C_MODE_END. Consequently, including
mysql/plugin_trace.h in an application
no longer requires the application to also include
my_global.h.

Applications might require mysql/plugin.h
or my_global.h for other reasons, of
course.
(Bug #17582168)

The mysql_version.h file defines two new
macros, LIBMYSQL_VERSION and
LIBMYSQL_VERSION_ID, that indicate the string
and numeric forms of the client library version.

In the client library included with MySQL Server
distributions, these macros have the same values as
MYSQL_SERVER_VERSION and
MYSQL_VERSION_ID. For example, in MySQL
5.7.4, MYSQL_SERVER_VERSION and
LIBMYSQL_VERSION are
"5.7.4-m14", and
MYSQL_VERSION_ID and
LIBMYSQL_VERSION_ID are
50704.

In the client library included with Connector/C
distributions, MYSQL_SERVER_VERSION and
MYSQL_VERSION_ID have the values of the
MySQL version on which the Connector/C distribution is
based, whereas LIBMYSQL_VERSION and
LIBMYSQL_VERSION_ID indicate the
Connector/C version. For example, Connector/C 6.1.3 is based
on MySQL 5.7.4, so MYSQL_SERVER_VERSION
and MYSQL_VERSION_ID have values of
"5.7.4-m14" and 50704,
whereas LIBMYSQL_VERSION and
LIBMYSQL_VERSION_ID have values of
"6.1.3" and 60103.

When a connection is returned to the thread pool plugin, the
connection thread context must be cleaned up. Previously, this
was done using COM_CHANGE_USER (which is like
the mysql_change_user() C API
function). However, that operation reauthenticates, which is
unnecessary network roundtrip overhead in this context.

Now it is possible for client connection state to be reset in a
more lightweight manner without causing reauthentication. The
API is exposed publicly through these changes:

It was not possible to build client-side plugins using
Connector/C because client_plugin.h
referenced a macro defined in the plugin.h
file, which is not included in Connector/C distributions.
(Bug #17582228)

References: See also Bug #17582168.

Upgrading Connector/C using the 64-bit version of the Windows
MSI package occurred in the default folder because registry
search logic was hardcoded to use the 32-bit registry.
(Bug #17515067)

After the fix for Bug #16409270, it was not possible to
#include <mysql.h> following
#include <windows.h>.
(Bug #17514554)