This section summarizes what has been added to, deprecated in, and removed from MySQL 8.2. A companion section lists MySQL server options and variables that have been added, deprecated, or removed in MySQL 8.2; see Section 1.6, “Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.2”.
If you are upgrading directly from MySQL 8.0 to MySQL 8.2, you should also consult Section 1.4, “What Is New in MySQL 8.1”, which lists changes in MySQL 8.1 relative to MySQL 8.0.
The following features have been added to MySQL 8.2:
Additions to server startup and shutdown messages. Added the following types of messages to the server startup and shutdown processes as noted in this list:
Start and end messages for server initialization when the server is started with
--initialize
or--initialize-insecure
; these are in addition to and distinct from those shown during normal server startup and shutdown.Start and end messages for
InnoDB
initialization.Start and end messages for init file execution during server initialization.
Start and end messages for for execution of compiled-in statements during server initialization.
Start and end mesages for crash recovery during server startup (if crash recovery occurs).
Start and end messages for initialization of dynamic plugins during server startup.
Start and end messages for compoenents initialization step (apparent during server startup).
Messages for shutdown of replica threads, as well as graceful and forceful shutdown of connection threads, during server shutdown.
Start and end messages for shutdown of plugins and components during server shutdown.
Exit code (return value) information with shutdown messages during initialization or server shutdown and end)
In addition, if the server was built using
WITH_SYSTEMD
, the server now includes every systemd message in the error log.Hash table optimization for set operations. MySQL 8.2 improves performance of statements using the set operations
EXCEPT
andINTERSECT
by means of a new hash table optimization which is enabled automatically for such statements, and controlled by setting thehash_set_operations
optimizer switch; to disable this optimization and cause the optimizer to used the old temporary table optimization from previous versions of MySQL, set this flag tooff
.The amount of memory allocated for this optimization can be controlled by setting the value of the
set_operations_buffer_size
server system variable; increasing the buffer size can further improve execution times of some statements using these operations.See Section 8.9.2, “Switchable Optimizations”, for more information.
MySQL Enterprise Audit. Added the
audit_log_filter_uninstall.sql
script to simplify removing MySQL Enterprise Audit.Pluggable authentication. Added support for authentication to MySQL Server using devices such as smart cards, security keys, and biometric readers in a WebAuthn context. The new WebAuthn authentication method is based on the FIDO and FIDO2 standards. It uses a pair of plugins,
authentication_webauthn
on the server side andauthentication_webauthn_client
on the client side. The server-side WebAuthn authentication plugin is included only in MySQL Enterprise Edition distributions.MySQL Enterprise Firewall. These enhancements were added:
MySQL Enterprise Firewall now permits its memory cache to be reloaded periodically with data stored in the firewall tables. The
mysql_firewall_reload_interval_seconds
system variable sets the periodic-reload schedule to use at runtime or it disables reloads by default. Previous implementations reloaded the cache only at server startup or when the server-side plugin was reinstalled.Added the
mysql_firewall_database
server system variable to enable storing internal tables, functions, and stored procedures in a custom schema.Added the
uninstall_firewall.sql
script to simplify removing an installed firewall.
MySQL Privileges. Added the
SET_ANY_DEFINER
privilege for definer object creation and theALLOW_NONEXISTENT_DEFINER
privilege for orphan object protection. Together these privileges coexist with the deprecatedSET_USER_ID
privilege.EXPLAIN FOR SCHEMA. Added a
FOR SCHEMA
option to theEXPLAIN
statement. The syntax is as shown here, wherestmt
is an explainable statement:EXPLAIN [options] FOR SCHEMA schema_name stmt
This causes
stmt
to be run as if in the named schema.FOR DATABASE
is also supported as a synonym.This option is not compatible with
FOR CONNECTION
.See Obtaining Execution Plan Information, for more information.
mysql_native_password. The
mysql_native_password
plugin, which was deprecated previously, now is no longer mandatory and can be disabled at server startup.If the server-side
mysql_native_password
authentication method is disabled, older client accounts that use the client-side plugin (prior to MySQL 5.5 and possibly MySQL 5.6) are no longer able to connect and the server writes an “Access denied” message to the error log. These connections are no longer possible because, although the protocol remains compatible, the authentication method supported by the client is missing.Replication: SQL_AFTER_GTIDS and MTA. The
START REPLICA
statement optionSQL_AFTER_GTIDS
is now compatible with the multi-threaded applier. (Previously, when MTA was enabled and the user attempted to use this option, the statement raised the warningER_MTS_FEATURE_IS_NOT_SUPPORTED
, and the replica was switched to single-threaded mode.) This means that a replica which needs to catch up with missing transactions can now do so without losing the performance advantage from multithreading.For more information, see Section 13.4.2.6, “START REPLICA Statement”, as well as the documentation for the
replica_parallel_workers
system variable. See also Section 17.2.3.2, “Monitoring Replication Applier Worker Threads”, and Section 23.7.11, “NDB Cluster Replication Using the Multithreaded Applier”.Replication terminology backwards compatibility. This release adds the
--output-as-version
option for mysqldump. This option allows you to create a dump from a MySQL 8.2 server that is compatible with older versions of MySQL; its value, one of those listed here, determines the compatibility of replication terminology used in the dump:SERVER
: Gets the version of the server and uses the latest versions of replication statements and variable names compatible with that MySQL version.BEFORE_8_2_0
: Output is compatible with MySQL servers running versions 8.0.23 through 8.1.0, inclusive.BEFORE_8_0_23
: Output is compatible with MySQL servers running versions prior to 8.0.23.
See the description of this option for more information.
In addition a new value is added to those already allowed for the
terminology_use_previous
system variable.BEFORE_8_2_0
causes the server to printDISABLE ON SLAVE
(now deprecated) instead ofDISABLE ON REPLICA
in the output ofSHOW CREATE EVENT
. The existing valueBEFORE_8_0_26
now also has this effect in addition to those it already had previously.
The following features are deprecated in MySQL 8.2 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.2 that have been removed in a higher MySQL series, statements may fail when replicated from a MySQL 8.2 source to a higher-series replica, or may have different effects on source and replica. To avoid such problems, applications that use features deprecated in 8.2 should be revised to avoid them and use alternatives when possible.
Wildcard characters in database grants. The use of the characters
%
and_
as wildcards in database grants is deprecated in MySQL 8.2.0 and later MySQL Innovation releases. You should expect for the wildcard functionality to removed in a future MySQL release and for these characters always to be treated as literals, as they are already whenever the value of thepartial_revokes
server system variable isON
.In addition, the treatment of
%
by the server as a synonym forlocalhost
when checking privileges is now also deprecated as of MySQL 8.2.0 and thus subject to removal in a future version of MySQL.old and new (server system variables). The
old
andnew
server system variables and related server options are deprecated in MySQL 8.2.0 and later Innovation releases, and a warning is now issued whenever either of these variables is set or read. Because these variables are destined for removal in a future version of MySQL, applications which depend on them should begin migration away from them as soon as possible.--character-set-client-handshake option. The
--character-set-client-handshake
server option, originally intended for use with upgrades from very old versions of MySQL, is now deprecated in MySQL 8.2.0 and later MySQL Innovation releases, where a warning is issued whenever it is used. You should expect this option to be removed in a future version of MySQL; applications depending on this option should begin migration away from it as soon as possible.binlog_transaction_dependency_tracking. The
binlog_transaction_dependency_tracking
server system variable is deprecated in MySQL 8.2.0 and later Innovation releases, and is subject to removal in a future version of MySQL. Referencing this variable or the equivalent mysqld startup option--binlog-transaction-dependency-tracking
now triggers a warning. There are no plans to replace this variable or its functionality, which is expected later to be made internal to the server.Replication SQL. MySQL 8.2 continues work begun in previous releases to update terminology used in SQL statements relating to MySQL Replication. This release deprecates the following statements, listed with their replacements:
RESET MASTER
: UseRESET BINARY LOGS AND GTIDS
instead.SHOW MASTER STATUS
: UseSHOW BINARY LOG STATUS
instead.SHOW MASTER LOGS
: UseSHOW BINARY LOGS
instead.PURGE MASTER LOGS
: UsePURGE BINARY LOGS
instead.
As part of this work, the
DISABLE ON SLAVE
option forCREATE EVENT
andALTER EVENT
is now deprecated, and is superseded byDISABLE ON REPLICA
. The corresponding termSLAVESIDE_DISABLED
is also now deprecated,and no longer used in event descriptions such as in the Information SchemaEVENTS
table;REPLICA_SIDE_DISABLED
is now shown instead.In addition, the
Com_show_master_status
system status variable is renamed toCom_show_binary_log_status
. The previous name is still supported for backwards compatibility, but is now deprecated and subject to removal in a future version of MySQL.SET_USER_ID privilege. The
SET_USER_ID
privilege is deprecated and is subject to removal in a future version of MySQL. WhenSET_USER_ID
is granted usingGRANT
, a SQL warning informs you of the deprecation status. It is now superseded by these new privileges:SET_ANY_DEFINER
for definer object creation.ALLOW_NONEXISTENT_DEFINER
for orphan object protection.
Both privileges are required to produce orphaned SQL objects using
CREATE PROCEDURE
,CREATE FUNCTION
,CREATE TRIGGER
,CREATE EVENT
, orCREATE VIEW
.
The following items are obsolete and have been removed in MySQL 8.2. Where alternatives are shown, applications should be updated to use them.
For MySQL 8.1 applications that use features removed in MySQL 8.2, statements may fail when replicated from a MySQL 8.1 source to a MySQL 8.2 replica, or may have different effects on source and replica. To avoid such problems, applications that use features removed in MySQL 8.2 should be revised to avoid them and use alternatives when possible.
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() function. The
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS()
SQL function was deprecated in MySQL 8.0, and is no longer supported in MySQL 8.2. Attempting to invoke this function now causes a syntax error.Instead of
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS()
, it is recommended that you useWAIT_FOR_EXECUTED_GTID_SET()
, which allows you to wait for specific GTIDS. This works regardless of the replication channel or the user client through which the specified transactions arrive on the server.expire_logs_days system variable. The
expire_logs_days
server system variable, deprecated in MySQL 8.0, has been removed. Attempting to get or set this variable at runtime, or to start mysqld with the equivalent option (--expire-logs-days
), now results in an error.In place of
expire_logs_days
, usebinlog_expire_logs_seconds
, which allows you to specify expiration periods other than (only) in an integral number of days.--abort-slave-event-count and --disconnect-slave-event-count server options. The MySQL server startup options
--abort-slave-event-count
and--disconnect-slave-event-count
, formerly used in testing, were deprecated in MySQL 8.0, and have been removed in this release. Attempting to start mysqld with either of these options now results in an error.