Documentation Home
MySQL 8.2 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.3Mb
PDF (A4) - 40.4Mb
Man Pages (TGZ) - 266.0Kb
Man Pages (Zip) - 370.4Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

MySQL 8.2 Reference Manual  /  General Information  /  What Is New in MySQL 8.1

1.4 What Is New in MySQL 8.1

This section summarizes what has been added to, deprecated in, and removed from MySQL 8.1 as compared to MySQL 8.0. A companion section lists MySQL server options and variables that have been added, deprecated, or removed in MySQL 8.1; see Section 1.5, “Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.1”.

Features Added in MySQL 8.1

The following features not found in MySQL 8.0 were added to MySQL 8.1:

  • Capturing EXPLAIN FORMAT=JSON output.  The 8.1 release extended EXPLAIN FORMAT=JSON with an INTO option, which provides the ability to store JSON-formatted EXPLAIN output in a user variable where it can be worked with using MySQL JSON functions, like this:

    mysql> EXPLAIN FORMAT=JSON INTO @myex SELECT name FROM a WHERE id = 2;
    Query OK, 0 rows affected (0.00 sec)
    
    mysql> SELECT JSON_EXTRACT(@myex, "$.query_block.table.key");
    +------------------------------------------------+
    | JSON_EXTRACT(@myex, "$.query_block.table.key") |
    +------------------------------------------------+
    | "PRIMARY"                                      |
    +------------------------------------------------+
    1 row in set (0.01 sec)

    This option can be used only if the EXPLAIN statement also contains FORMAT=JSON; otherwise, a syntax error results. This requirement is not affected by the value of explain_format.

    INTO can be used with any explainable statement with the exception of EXPLAIN FOR CONNECTION. It cannot be used with EXPLAIN ANALYZE.

    For more information and examples, see Obtaining Execution Plan Information.

  • Client comments preserved.  In MySQL 8.0, the stripping of comments from the mysql client was the default behavior; in MySQL 8.1, the default was changed to preserving such comments.

    To enable the stripping of comments as was performed in MySQL 8.0 and earlier, start the mysql client with --skip-comments.

  • MySQL Replication: SOURCE_RETRY_COUNT change.  The default value for the SOURCE_RETRY_COUNT option of the CHANGE REPLICATION SOURCE TO statement was changed to 10. This means that, using the default values for this option and for SOURCE_CONNECT_RETRY (60), the replica waits 60 seconds between reconnection attempts, and keeps attempting to reconnect at this rate for 10 minutes before timing out and failing over.

    This change also applies to the default value of the deprecated --master-retry-count server option. (You should use SOURCE_RETRY_COUNT, instead.)

    For more information, see Section 17.4.9.1, “Asynchronous Connection Failover for Sources”.

  • group_replication_set_as_primary() and DDL statements.  The group_replication_set_as_primary() function waits for ongoing DDL statements such as ALTER TABLE when waiting for all transactions to complete, prior to electing a new primary.

    For more information, see the description of this function.

  • The MySQL version number used in version-specific comments supports a major version consisting of one or two digits; this means that the entire version can be either five or six digits long. For more information about how this change affects handling of versioned comments in MySQL, see Section 9.7, “Comments”.

  • Logging of the shutdown process was enhanced, with the addition of startup and shutdown messages for the MySQL server, plugins, and components. Such messages are now also logged for closing connections. These additions should facilitate troubleshooting and debugging problems, particularly in the event that the server takes an excessively long time to shut down.

    For more information, see Section 5.4.2, “The Error Log”.

  • Added the SHOW PARSE_TREE statement, which shows the JSON-formatted parse tree for a SELECT statement. This statement is intended for testing and development use only, and not in production. It is available only in debug builds, or if MySQL was built from source using the CMake -DWITH_SHOW_PARSE_TREE option, and is not included or supported in release builds.

  • Added the tls-certificates-enforced-validation system variable, which permits a DBA to enforce certificate validation at server startup or when using the ALTER INSTANCE RELOAD TLS statement to reload certificates at runtime. With enforcement enabled, discovering an invalid certificate halts server invocation at startup, prevents loading invalid certificates at runtime, and emits warnings. For more information, see Configuring Certificate Validation Enforcement.

  • Added a number of status variables specific to the Group Replication plugin that improve diagnosis and troubleshooting of network instabilities, providing statistics about network usage, control messages, and data messages for each group member.

    See Section 18.9.2, “Group Replication Status Variables”, for more information.

    As part of this work, a new MEMBER_FAILURE_SUSPICIONS_COUNT column was added to the Performance Schema replication_group_communication_information table. The contents of this column are formatted as a JSON array whose keys are group members ID and whose values are the number of times the group member has been considered suspect. See the description of this table for more information.

  • Added server system variables to control the amount of time MySQL accounts that connect to a MySQL server using LDAP pluggable authentication must wait when the LDAP server is down or unresponsive. The default timeout became 30 seconds for the following simple and SASL-based LDAP authentication variables:

    Connection and response timeouts are configurable through the system variables on Linux platforms only. For more information, see Setting Timeouts for LDAP Pluggable Authentication.

Features Deprecated in MySQL 8.1

The following features were deprecated in MySQL 8.1 and may be removed in a future series. Where alternatives are shown, applications should be updated to use them.

For applications that use features deprecated in MySQL 8.1 that have been removed in a higher MySQL series, statements may fail when replicated from a MySQL 8.1 source to a replica using a later version, or may have different effects on source and replica. To avoid such problems, applications that use deprecated features should be revised to avoid them and use alternatives when possible.

  • Deprecations in 8.0.34 and 8.1.0.  Features deprecated in both 8.0.34 and 8.1.0 are documented in the MySQL 8.0 manual. See MySQL 8.0 Deprecations.

Features Removed in MySQL 8.1

The following items are obsolete and were removed in MySQL 8.1. Where alternatives are shown, applications should be updated to use them.

For MySQL 8.0 applications that use features removed in MySQL 8.1 or later, statements may fail when replicated from a MySQL 8.0 source to a replica running MySQL 8.1 or later, or may have different effects on source and replica. To avoid such problems, applications that use such removed features should be revised to avoid them and use alternatives when possible.