Documentation Home
MySQL Connector/C++ Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 301.4Kb
PDF (A4) - 300.9Kb


MySQL Connector/C++ Release Notes  /  Changes in MySQL Connector/C++ 8  /  Changes in MySQL Connector/C++ 8.0.24 (2021-04-20, General Availability)

Changes in MySQL Connector/C++ 8.0.24 (2021-04-20, General Availability)

Connection Management Notes

  • Previously, for client applications that use the legacy JDBC API (that is, not X DevAPI or X DevAPI for C), if the connection to the server was not used within the period specified by the wait_timeout system variable and the server closed the connection, the client received no notification of the reason. Typically, the client would see Lost connection to MySQL server during query (CR_SERVER_LOST) or MySQL server has gone away (CR_SERVER_GONE_ERROR).

    In such cases, the server now writes the reason to the connection before closing it, and client receives a more informative error message, The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. (ER_CLIENT_INTERACTION_TIMEOUT).

    The previous behavior still applies for client connections to older servers and connections to the server by older clients. (WL #14425)

  • For connections made using X Plugin, if client with a connection to a server remains idle (not sending to the server) for longer than the relevant X Plugin timeout setting (read, write, or wait timeout), X Plugin closes the connection. If any of these timeouts occur, the plugin returns a warning notice with the error code ER_IO_READ_ERROR to the client application.

    For such connections, X Plugin now also sends a warning notice if a connection is actively closed due to a server shutdown, or by the connection being killed from another client session. In the case of a server shutdown, the warning notice is sent to all authenticated X Protocol clients with open connections, with the ER_SERVER_SHUTDOWN error code. In the case of a killed connection, the warning notice is sent to the relevant client with the ER_SESSION_WAS_KILLED error code, unless the connection was killed during SQL execution, in which case a fatal error is returned with the ER_QUERY_INTERRUPTED error code.

    If connection pooling is used and a connection close notice is received in a session as a result of a server shutdown, all other idle sessions that are connected to the same endpoint are removed from the pool.

    Client applications can use the warning notices to display to users, or to analyze the reason for disconnection and decide whether to attempt reconnection to the same server, or to a different server. (WL #13946)

Packaging Notes

  • Connector/C++ packages now include sasl2 modules due to connection failures for accounts that use the authentication_ldap_sasl authentication plugin. (Bug #32175836)

Security Notes

Bugs Fixed

  • Upon connecting to the server, Connector/C++ executed a number of SHOW [SESSION] VARIABLES statements to retrieve system variable values. Such statements involve locking in the server, so they are now avoided in favor of SELECT @@var_name statements.

    Additionally, Connector/C++ was trying to fetch the value of the max_statement_time system variable, which has been renamed to max_execution_time. Connector/C++ now uses the correct variable name, with the result that getQueryTimeout() and setQueryTimeout() now work properly for both Statement and Prepared Statement objects. (Bug #28928712, Bug #93201)

  • DatabaseMetaData.getProcedures() failed when the metadataUseInfoSchema connection option was false. (Bug #24371558)