MySQL Router Changelog

What's new in MySQL Router 8.0.34

Jul 19, 2023
  • Bugs Fixed:
  • Deprecated ciphers were removed from the default cipher lists of client_ssl_cipher and server_ssl_cipher. Triple-DES ciphers and DSS ciphers are no longer permitted. (Bug #35489217)
  • MySQL Router failed to start if configured to use ECC certificates. The following error was displayed: no RSA certificate. (Bug #35317484)
  • Connections were not shared if the client enabled CLIENT_MULTI_STATEMENTS with COM_SET_OPTION. (Bug #35263986)
  • If USE SCHEMA was sent by query instead of by the dedicated command, connection sharing was blocked. (Bug #35245250)
  • If a client connected to the server through MySQL Router, while a SUPER connection was already established, and the server's max_connections was reached, the connection was dropped and an error similar to the following was erroneously returned to the client: Lost connection to MySQL server during query. This error was also sent twice.
  • As of this release, the correct error message is returned. (Bug #35239607)
  • SHOW WARNINGS did not behave as expected if connection sharing was enabled. It did not return all the status-flags, such as autocommit. (Bug #35213196)
  • Client authentication failed if the client authenticated with a password and a default authentication method other than caching_sha2_password. The error message included: using password: NO. (Bug #35195287)
  • Connection sharing was disabled if a change-user operation occurred, resetting the user's stored password. As of this release, if a change-user operation is called, the existing connection is updated with the new credentials. (Bug #35189721)
  • The client's character set was not restored when their connection was restored from the connection pool. (Bug #35184765)
  • It was not possible to create an InnodB Cluster with the latest version of MySQL Router, and MySQL Server, and an older version of MySQL Shell, such as 8.0.11. MySQL Router failed to start as a result of a failure to recognise an older version of the metadata view used by MySQL Router. (Bug #35067083)

New in MySQL Router 8.0.33 (Apr 18, 2023)

  • Functionality Added or Changed:
  • MySQL Router now reuses SSL connections to the metadata server when reconnecting for metadata updates. (Bug #35057590)
  • Multiple performance improvements were made in connection management, memory management, and statement processing. (Bug #34964415, Bug #34863113, Bug #34921527, Bug #34977233, Bug #35006489, Bug #35011055, Bug #35019415)
  • Bugs Fixed:
  • Under certain circumstances, if an ENOENT system error was returned while MySQL Router was establishing connections to a routing destination, the accepting port was closed for that routing destination, and MySQL Router stopped accepting connections on that port. An error similar to the following was displayed:
  • routing ERROR [...] no backend available to connect to
  • routing INFO [...] Stop accepting connections for routing
  • routing:bootstrap_rw listening on 6446
  • As of this release, the port is not closed and additional logging is added for such errors. (Bug #35157953)
  • It was not possible to connect to MySQL Router with PHP and an account with an empty password. Authentication failed with the following error:
  • AUTH_RESPONSE packet 1 bytes shorter than expected.
  • Under certain circumstances, if connection sharing was enabled and the establishment of a new connection failed, the resulting server connection was left in an invalid state; the socket was closed, but the connection was kept alive.
  • As a result, multiple TLS connection alerts were logged. (Bug #35072554)
  • Passwords longer than 20 characters failed authentication through MySQL Router if the client connection was not encrypted and requested the server key. (Bug #35028666)
  • It was not possible to connect with pymysql. An error similar to the following was returned:
  • pymysql.err.OperationalError: caching sha2: Unknown packet for public key: b'-'
  • The server logs recorded Aborted connection if a pooled connection was idle for longer than the value of idle_timeout and was closed. (Bug #34983883)
  • MySQL Router did not correctly handle requests for compression over unencrypted connections, by clients such as PHP+PDO and pymysql, for example. An error similar to the following was returned:
  • Packets out of order. Expected 1 received 5. Packet size=26 in
  • pdo-compressed.php on line 3
  • As of this release, MySQL Router returns an appropriate error stating that compression is not supported. (Bug #34960959)
  • Under certain circumstances, on Mac OS, Cluster endpoints were not removed from quarantine, even if they were valid and it was possible to connect to them. (Bug #34909071)
  • Under certain circumstances, MySQL Router did not close gracefully on Solaris, but crashed while closing. (Bug #34904367)
  • MySQL Router did not immediately detect connections to unresponsive ports on Mac OS. As a result, the connection reported a timeout instead of a failed connection. (Bug #34861635)
  • MySQL Router queried the metadata from the first server listed regardless of the role of that server. As a result, MySQL Router could retrieve metadata from a current secondary, which had been a primary, instead of the current primary. As of this release, MySQL Router takes the metadata server's current role into account.
  • This fix also correct an issue where MySQL Router did not discard configuration metadata relating to offline cluster members. (Bug #34835509, Bug #34857112)
  • If an X Protocol client or connector closed a connection, MySQL Router did not respond as expected. As a result, if the client waited for a response, the connection could remain open and unusable.
  • It was not possible to connect to the server through MySQL Router using older PHP clients if the MySQL account used caching_sha2_password and MySQL Router was configured to use PASSTHROUGH/AS_CLIENT or PREFERRED/AS_CLIENT options. (Bug #110161, Bug #35112431)
  • Renaming a cluster, using cluster.setOption(), caused routing to fail due to an issue with MySQL Router configuration. This issue was caused by MySQL Router using the cluster name written to the MySQL Router configuration file during bootstrapping. The cluster name was then used in queries to the metadata cache, which failed when the cluster was renamed.
  • As of this release, the cluster name is not used, the UUID is used instead. That is, Group Replication UUID for group replication clusters, ClusterSet UUID for ClusterSets, and Cluster UUID for ReplicaSet clusters. The UUID is written to MySQL Router's JSON state file.

New in MySQL Router 8.0.32 (Jan 26, 2023)

  • Functionality Added or Changed:
  • Removed distutils support, which is deprecated as of Python 3.10 and removed in Python 3.12.
  • Adopted type hint enforcement for function and class attributes with mypy; this is compliant with PEP 8 for module mysql.connector. The integration includes a git pre-commit hook for mypy.
  • On Windows, added a kerberos_auth_mode connection option that's set to either "SSPI" (default) or "GSSAPI". This allows choosing between SSPI and GSSAPI at runtime for the authentication_kerberos_client authentication plugin on Windows. Previously, only the SSPI mode was supported on Windows. For general usage information, see Kerberos Pluggable Authentication. This connection is ignored on other platforms, such as Linux, as they only support GSSAPI.
  • Limitation: GSSAPI can't be used with the pure Python implementation on Windows using authentication with a username and password, a limitation with the C library used by the python-gssapi package used by the pure Python implementation of Connector/Python.
  • Bugs Fixed:
  • Using USE_TZ=True in the Django settings would raise this exception: ValueError: Not naive datetime (tzinfo is already set).
  • Removed debug messages that showed authentication data. (Bug #34695103)
  • Updated the protobuf version requirement to version >= 3.11.0, <=3.20.3.
  • Connecting to MariaDB could fail with an unsupported character set because the default MySQL character collection is MySQL 8.0 specific. Now the 5.7 character set is used by default, but is switched to a 8.0 character set if the queried server is version 8.0.
  • Incorrect MySQLCursor.statement values were returned with cursor.execute(query_string, multi=True) under the following conditions: The query string contained two or more queries seperated by a semicolon, and the non-first query used a literal or identifier containing either an odd number of backticks, quotes, or double quotes.
  • On Windows, changed the security support provider (SSP) from Kerberos to Negotiate. Using Negotiate will then select either Kerberos or NTLM as the SSP.
  • On Windows, the Connector/Python MSI did would not detect and install with Python 3.11. The workaround is to use pip install mysql-connector-python instead.
  • When using a prepared cursor, if a datetime column contained 00:00:00 as the time, a Python date object was returned instead of datetime.
  • The MySQLCursor.executemany() method failed to batch insert data since the regular expression (RE) sentinel did not detect batch cases correctly; this meant using the one-on-one insert instead, which led to decreased performance.
  • Added a new init_command connection option; an SQL query that's immediately executed after the connection is established.
  • Russian characters were not handled correctly by the c-ext version's X DevAPI driver. String values are now encoded to their byte string representation before being sent to protobuf.
  • When fetching results from a prepared cursor using the pure Python implementation, it would fail if the VARBINARY column contained bytes that could not be decoded. The bytes are now returned if they cannot be decoded.
  • Fixed multiple reference leaks and removed redundant code.
  • The cursors (both pure and c-ext versions) uses a single SELECT query to retrieve procedure result parameters after a procedure call; but one SET call was used per parameter when setting the input parameters. This was optimized to always use a single SET call for one or multiple parameters.
  • Improved warning handling throughout the connector.
  • Added a new MySQLCursorPreparedDict class option that is similar to MySQLCursorPrepared; the difference is that the former returns a fetched row as a dictionary where column names are used as keys while the latter returns a row as a traditional record (tuple).
  • Enable the use of dictionaries as parameters in prepared statements using the '(param)s' format as placeholders.
  • Using MySQLConverter.escape() on datetime objects raised this error: TypeError: an integer is required. Now it does not attempt to escape values that are not bytes or string types.
  • Not all parameters were added to the INSERT statement when using INSERT IGNORE with cursor.executemany().

New in MySQL Router 8.0.30 (Jul 26, 2022)

  • Bugs fixed:
  • Router would block clients if the server backend was unreachable. (Bug #34218994)
  • Added Enterprise Linux 9 (EL9) support. (Bug #34203755)
  • Fixed potential deadlock issue with the metadata cache plugin's cache_stop() API function. (Bug #34135189)
  • Upgraded bundled duktape version from 2.6.0 to 2.7.0 (Bug #34089826)
  • Added OpenSSL 3 support, which includes using the OpenSSL 3 API instead of the deprecated OpenSSL 1.x API when compiled with OpenSSL 3. (Bug #34042982)
  • Now Router actively cancels the client-side component of a connection if the associated server-side connection was terminated. (Bug #34038187)
  • On Solaris, Router would unexpectedly halt when connect_timeout expired after a successful connection. (Bug #34021483)
  • Router would emit an "option is not supported" error if ssl_* options were defined in the [metadata_cache] section. (Bug #33996132)
  • Updated the X protocol connection code to better handle file related errors, such as "too many open files" and "no such file or directory" -- this error handling was already present for classic protocol connections. (Bug #33962604)
  • On macOS, Router would not shut down (SIGKILL) if a connection to a non-responsive endpoint was initiated until after the associated connect_timeout expired. The shutdown process is now more immediate. (Bug #33944074)
  • Optimized the ClusterSet metadata refresh mechanism by merging two queries into one. (Bug #33819386)

New in MySQL Router 8.0.28 (Apr 26, 2022)

  • Functionality Added or Changed:
  • Added the --conf-set-option command line option to set a value for any generated configuration option during bootstrap. For example, setting --conf-set-option=logger.level=debug sets [logger]level=debug in the generated mysqlrouter.conf.
  • On Windows, the following options now accept a custom service name parameter: --install-service, --install-service-manually, and --remove-service. The previous and default value for each of these is MySQLRouter.
  • Added the ability to alter configuration options at runtime via the command line. The format is --section[:section_key].option_name=option_value; such as --DEFAULT.plugin_folder=/home/dev/. This new feature does not modify the configuration file as it only affects the runtime; and it overrides defaults and configured options.
  • Bugs Fixed:
  • On Windows, removed the openssl/*.h includes to allow tls_context.h to include them in the correct order. This allows Router to build on Windows with OpenSSL 1.0.x. (Bug #33579528, Bug #105535)
  • Two informative text files were added: INFO_BIN contains information about the build environment used to produce the distribution, and INFO_SRC provides information about the product version and the source repository from which the distribution was produced.
  • Update: these files were added to Windows MSI builds in 8.0.29. (Bug #33510726)
  • Fixed error reporting related to metadata-cache's role definition for its destination URL. Rather than report "Invalid server role in metadata cache routing" it's now more specific and references the allowed role values, which are PRIMARY, SECONDARY, and PRIMARY_AND_SECONDARY. (Bug #33444102)
  • With logging_folder set, Router would always output "logging facility initialized, switching logging to loggers specified in configuration" to the console; now this message is only displayed if previous console output was detected. (Bug #33327741)
  • Router could continue using a former Primary Cluster for periodic metadata updates despite it being an invalidated target_cluster. (Bug #33300235)
  • Router incorrectly accepted non-numeric values for numeric options. For example, 'a' was interpreted as '0'. They are now rejected. (Bug #32248283)

New in MySQL Router 8.0.25 (Jul 20, 2021)

  • This release contains no functional changes and is published to align the version number with the MySQL Server 8.0.25 release.

New in MySQL Router 8.0.19 (Mar 6, 2020)

  • Functionality Added or Changed:
  • Router now utilizes metadata version 2.0 whereas all previous Router versions used metadata v1.0.1. Router is backwards compatible with metadata v1.0.1, except bootstrapping is not supported with v1.0.1. The Router bootstrapping error log was updated to reflect this requirement, in that MySQL Shell's dba.upgradeMetadata() exists to perform a metadata upgrade. (Bug #30381549)
  • Added Async ReplicaSet Cluster support.
  • Added a new cluster_type configuration option to the [metadata_cache] section. Accepted values are "ar" (Async ReplicaSet) or "gr" (Group Replication). Bootstrapping checks the target instance type and sets this value accordingly.
  • Added new --account and --account-create options to configure Router's bootstrap user.
  • Metadata version checking functionality was added. Versions checked include 0.0.0 (a metadata upgrade is in process), 1.x.x (old metadata version), and 2.x.x (current metadata version). The metadata version is saved to Router's new routers.version field.
  • Bugs Fixed:
  • Fixed gcc 5.5 compilation warnings. (Bug #30505196, Bug #97475)
  • On Windows, when the Windows service created the Router log file (which happens when running router as a service by bootstrap), the log file became unreadable (inaccessible) by anyone else; including the local administrator. The workaround was to manually delete and recreate the log file after installation.
  • Related, the --install-service parameter attempted to grant r/w rights to an existing log file and failed if it lacked rights to do so. Now it no longer attempts modifying privileges and instead reports an error if LocalService lacks sufficient access. (Bug #30471498, Bug #30916395, Bug #97389)
  • The Router's table was extended to include the username that accesses the metadata. (Bug #30435133)
  • Improved GCC 5.5.0 support as it does not support constexpr. (Bug #30406328)
  • An implicit move-assign generated an error when built with DevStudio 12.6; making it explicit eliminated the error. (Bug #30396902)
  • Fixed IPv6 metadata handling. (Bug #30354273)
  • Building Router with AddressSanitizer (ASan) now uses ASAN's crash handler on all systems, when before it would use a generic crash handler on POSIX systems. (Bug #30298740)
  • The HTTP REST API bind_address configuration option only accepted IPv4 addresses. (Bug #30287987)
  • The bootstrap process would improperly display text related to a successful setup before showing an error for failing to generate a Router configuration file. (Bug #30055358)
  • The bootstrap process did not properly store the configured access ports. (Bug #29969566)
  • On shut down, Router now removes the pid-file it generated during start up. (Bug #29441087)

New in MySQL Router 8.0.18 (Oct 14, 2019)

  • Functionality Added or Changed:
  • Added a timestamp_precision logger configuration option to configure logged timestamps.
  • Added a new mysqlrouter_keyring utility to help view and manage the Router keyring.
  • Bugs Fixed:
  • On Windows, ProcessLauncher-related error handling was improved. (Bug #30188010)
  • Improved SQL quoting by the bootstrap process, which previously did not quote the username in queries. (Bug #30123992)
  • On MacOS, Router failed to start after a successful bootstrap because the loader could not locate the SSL libraries. (Bug #30096843)
  • Executing python2.7 setup.py install failed to create the mysqlx folder for commercial portable packages. (Bug #29959309)
  • SIGTRAP is now handled the same way as SIGINT in normal operations, and SIGTRAP allows debugger (such as gdb) to jump in. (Bug #29843245)
  • The internal REST API add path functionality did not always remove the current path first, which could cause an unexpected halt. (Bug #29833031)
  • Router could halt unexpectedly if unable to spawn another thread. (Bug #29759391)
  • On Windows 10, Router built with -DINSTALL_LAYOUT=WIN would create a directory named "ENV{APPDATA}" during bootstrap. (Bug #29160784)

New in MySQL Router 8.0.17 (Sep 9, 2019)

  • Functionality Added or Changed:
  • Added the use_gr_notifications [metadata-cache] option to enable Group Replication notifications, which is disabled by default. It supports group_replication/membership/quorum_loss, group_replication/membership/view, group_replication/status/role_change, and group_replication/status/state_change.
  • Optionally use the new --conf-use-gr-notifications bootstrap command-line to enable this option in the generated configuration file.
  • Added a REST API that follows the OpenAPI 2.0 specification and is implemented as a plugin; load the plugin using [rest_api] in the configuration file. It also requires the http_server plugin. Use the optional require_realm configuration option (string) to define the authentication realm.
  • The base-path for all REST endpoints is "api" followed by a numeric API version that is defined as the release date, such as "/api/20190722/". The system follows camelCase naming rules and errors follow RFC 7807. The system exposes a swagger.json file as /api/ {apiVersion}/swagger.json.
  • Bugs Fixed:
  • Bootstrapping could misclassify a hostname as IPv6 and surround it with square brackets in the state (state.json) file; and this produced a "Configuration error: cluster-metadata-servers is incorrect" error. A workaround was to disable ipv6 support on the system. (Bug #29876948, Bug #95531)
  • Starting the http_server plugin against a port that was already bound would yield a confusing error, such as "Error: bind('0.0.0.0:10100) failed: The operation completed successfully." (Bug #29823472)
  • Improved the connection counter logic to prevent a potential unexpected halt before completing the shutdown process. (Bug #29820725)
  • Requesting the metadata-cache health immediately after start up could cause an expected exit by get_destinations() if metadata_cache's cache-api was not yet initialized. (Bug #29820155)
  • Bootstrapping would fail on hosts that defined multiple network interfaces. (Bug #29814629)
  • Optimized logging mechanism; system generated log messages independent of the log level. Now log messages are only prepared if configured to do so. (Bug #29798420)
  • Fixed potential blocking during shutdown by adding proper libmysqlclient deinitialisation where needed. This bug only affected DEBUG builds. (Bug #29635378)
  • harness/CMakeLists.txt was renamed to harness/src/CMakeLists.txt. (Bug #29629788)
  • The loaded plugin message level was changed from level "info" to "debug". (Bug #29616101)
  • The bootstrap "invalid URI" error message was improved. (Bug #29609170)
  • HTTPS connections with ECDHE ciphers to Router's http_server component failed if built against OpenSSL 1.0.1. (Bug #29609052)
  • The file generated by mysqlrouter_passwd was world-readable, and is now user-readable (Bug #29589127)
  • For the REST API, unsupported query parameters now return the 400 HTTP status code; and remain ignored. (Bug #29556935)
  • Log lines above 512 characters were truncated. (Bug #29540910)
  • For the REST API, OPTION, TRACE, and CONNECT requests now return the application/problem+json Content-Type and 405 HTTP status code. (Bug #29539557)
  • The HTTP server component now supports .jpg/.jpeg image files, and file extension matches are now case-insensitive. (Bug #29508595)
  • Added Visual Studio 2019 support. (Bug #29454252)
  • An unknown [http_auth_realm] backend yielded an unclear error. (Bug #29421759)
  • An uncaught exception was generated if a client socket was shutdown the client peer address was retrieved. (Bug #29382585)
  • Misleading "Potential changes detected in cluster" warnings were added to Router's log file. Node order differences no longer cause these errors. (Bug #29264764, Bug #94060)
  • Router would start if bootstrap_server_addresses was empty or not set. Now Router fails to start in this case if cluster-metadata-servers (a dynamic-config attribute) is also empty. (Bug #28352482)
  • The .ini configuration file locations are now detected and displayed in --help output. (Bug #28261802)
  • With Debian packages, the bootstrap process could fail when used with the --directory option. (Bug #27034449)

New in MySQL Router 8.0.11 (Apr 26, 2018)

  • Bugs Fixed:
  • Some failed SQL queries executed during the bootstrap process resulted in a generic "Unknown error" message instead of reporting the original error message received from the MySQL server.
  • As a workaround, setting level=DEBUG during bootstrap yielded these SQL errors. (Bug #27721898)
  • Some unexpected errors from the MySQL server were not shown during the Router bootstrap process. (Bug #27721834)
  • Router failed to compile on Alpine Linux 3.6. (Bug #27697883)
  • Router's max_connect_errors option did not function in v8.0.4. (Bug #27564958)
  • Bootstrapping would only function if --bootstrap was the first command-line argument. Now the argument order is irrelevant. (Bug #25054974)