MySQL Connector/C Changelog

What's new in MySQL Connector/C 6.1.5

Jun 30, 2014
  • Functionality Added or Changed:
  • The server can now report session-state changes to client programs. Reportable session state consists of these values:
  • The default schema (database)
  • Session-specific values for system variables
  • User-defined variables
  • Temporary tables
  • Prepared statements
  • The MySQL client/server protocol now includes tracker information so that session state changes can be detected. One use for the tracker mechanism is that it provides a means for MySQL Connectors, Fabric, and client applications to determine whether any session context is available to ensure session migration from one server to another. (To change connections in a load-balanced environment, it is necessary to detect whether there is session state to take into consideration when deciding whether a switch can be made.)
  • The user interface to control the tracker and retrieve state-change information from it has the following components, which enable implementation of state-change tracking on the client side:
  • Clients can request notification when there is a change to any of the session state-related values just listed, in the form of a flag that is set in the OK packet received from the server after the change occurs. To control notification, enable or disable the session_track_state_change system variable. This variable is disabled by default.
  • Clients can request notification of changed values for certain specific types of session state information:
  • The default schema name. To control notification, enable or disable the session_track_schema system variable. This variable is enabled by default.
  • The session values of system variables. Notification occurs for the system variables named by the session_track_system_variables system variable. By default, notification is enabled for time_zone, autocommit, character_set_client, character_set_results, and character_set_connection. (The latter three variables are those affected by SET NAMES.)
  • To enable applications to extract the state-change information returned by the server, the MySQL C API includes a pair of functions:
  • mysql_session_track_get_first() fetches the first state-change information received from the server.
  • mysql_session_track_get_next() fetches any remaining state-change information received from the server. Following a successful call to mysql_session_track_get_first(), call this function repeatedly as long as it returns success.
  • The mysqltest program has enable_session_track_info and disable_session_track_info commands to enable and disable tracking of session state-change information.
  • Because there are new API functions (mysql_session_track_get_first(), mysql_session_track_get_next()), the client library ABI version is now 18.3. Shared library names now include 18.3 where appropriate.
  • Bugs Fixed:
  • Calling mysql_get_server_version() with an invalid connection handler argument caused the client to exit. Now it returns 0 and reports a CR_COMMANDS_OUT_OF_SYNC error. (Bug #18053212)
  • The C client library could leak memory when client plugins were used. (Bug #17933308)
  • On Windows, calling mysql_thread_init() call without mysql_init() caused the client to exit. Now it returns a nonzero result because it is an error to call mysql_thread_init() before the client library is initialized with mysql_library_init(). (Bug #17514920)
  • There was a difference in certificate handling by yaSSL and OpenSSL (used for Community and Enterprise, respectively). OpenSSL expected a blank certificate to be sent when not all of the --ssl-ca, --ssl-cert, and --ssl-key options were specified, and yaSSL did not do so. To resolve this, yaSSL has been modified to send a blank certificate when an option is missing. (Bug #68788, Bug #16715064)

New in MySQL Connector/C 6.1.3 (Dec 27, 2013)

  • 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. 
For more information, see mysql_options().
  • Functionality Added or Changed:
  • A new mysql_get_option() C API function is available that returns the current value of applicable mysql_options() options. See mysql_get_option().
  • 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.
  • Resetting a connection has effects similar to mysql_change_user() or an auto-reconnect except that the connection is not closed and reopened, and reauthentication is not done. See mysql_change_user()) and see Controlling Automatic Reconnection Behavior). 
For more information, see mysql_reset_connection() and mysql — The MySQL Command-Line Tool.
  • Connector/C is now included in MySQL Installer (Windows).
  • Because there are new API functions (mysql_get_option(), mysql_reset_connection()), the library ABI version is now 18.2. Shared library names now include 18.2 where appropriate.

New in MySQL Connector/C 6.1.2 (Oct 1, 2013)

  • Functionality Added or Changed:
  • The implementation of condition variables specific to Windows XP and Windows Server 2003 was removed from the source code because MySQL is not supported on those platforms as of MySQL 5.6. This change has the following implication: Previously, Connector/C 6.1, while not officially supported on Windows XP or Windows Server 2003, could be used on those platforms. This is no longer possible.
  • MySQL now supports the use of client-side plugins that implement a trace of communication between a client and the server that takes place using the client/server protocol. Protocol trace plugins use the client plugin API.
  • In Connector/C source distributions, a test protocol trace plugin is implemented in the test_trace_plugin.cc file in the libmysql directory. This can be examined as a guide to writing other protocol trace plugins.
  • Static libraries built with VS2008, VS2010, VS2012 are now distributed as part of Connector/C packages for Windows: ZIP and MSI. New directories named vs9, vs10, and vs11 located under the lib directory contain static libraries and corresponding pdb files built with VS2008, VS2010, and VS2012, respectively.
  • Bugs Fixed:
  • The CLIENT_CONNECT_WITH_DB flag was improperly handled in the C client library. This could lead to a malformed packet sent to the server. (Bug #17351732)
  • The mysql_real_connect() C API function could leak memory if it failed. (Bug #17337684)
  • The mysql_options() C API function could leak memory if called more than once with the MYSQL_SET_CLIENT_IP option. (Bug #17297012)
  • The Connector/C MSI package was missing the following files: ChangeLog, README, LICENSE, COPYING, INFO_SRC, INFO_BIN. (Bug #17261526)
  • The Connector/C RPM package was missing the following files: INFO_SRC, INFO_BIN, my_print_defaults, perror. (Bug #17261610)
  • On Windows, a MySQL client program that simply used #include could not be compiled due to missing Windows declarations in that file. The same program would compile on other platforms. (Bug #16409270)
  • The libmysql.dll library was missing several symbols: my_init, mysql_client_find_plugin, mysql_client_register_plugin, mysql_load_plugin, mysql_load_plugin_v, and mysql_plugin_options. (Bug #69204, Bug #16797982)

New in MySQL Connector/C 6.1.1 (Aug 5, 2013)

  • Functionality Added or Changed:
  • The C API libmysqlclient shared-library .so files now have version 18.1.0 (up from version 18.0.0 used in 6.1.0). (Bug #16809055)
  • Bugs Fixed:
  • The mysql_options4 symbol was missing from libmysql.dll. (Bug #69204, Bug #16797982)