在升级到 MySQL 8.4 之前,请查看下列各部分中描述的更改,以确定哪些适用于您当前的 MySQL 安装和应用程序。Before upgrading to MySQL 8.4, review the changes described in the following sections to identify those that apply to your current MySQL installation and applications.
此外,您可以查阅此处列出的资源:In addition, you can consult the resources listed here:
本节包含有关 MySQL 8.4 不兼容更改的信息。This section contains information about incompatible changes in MySQL 8.4.
空间索引。 在升级到 MySQL 8.4.4 或更高版本时,建议您事先删除任何空间索引,然后在升级完成后重新创建它们。或者,您也可以在升级后立即删除并重新创建这些索引,但在使用包含这些索引的任何表之前完成此操作。Spatial indexes. When upgrading to MySQL 8.4.4 or later, it is recommended that you drop any spatial indexes beforehand, then re-create them after the upgrade is complete. Alternatively, you can drop and re-create such indexes immediately following the upgrade, but before making use of any of the tables in which they occur.
更多信息,请参见 第 13.4.10 节,“创建空间索引”。For more information, see Section 13.4.10, “Creating Spatial Indexes”.
已移除 WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() 函数。 在 MySQL 8.0 中已弃用的
WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS()SQL 函数已被移除;现在尝试调用它会导致语法错误。请改用WAIT_FOR_EXECUTED_GTID_SET()。WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS() function removed. TheWAIT_UNTIL_SQL_THREAD_AFTER_GTIDS()SQL function, deprecated in MySQL 8.0 has been removed; attempting to invoke it now causes a syntax error. UseWAIT_FOR_EXECUTED_GTID_SET()instead.authentication_fido和authentication_fido_client在某些平台上不再可用。 由于将服务器捆绑的 libfido2 库升级到 1.13.0 版本,该版本要求 OpenSSL 1.1.1 或更高版本,因此authentication_fido和authentication_fido_client身份验证插件在 Enterprise Linux 6、Enterprise Linux 7、Solaris 11 或 SUSE Enterprise Linux 12 上不再可用。authentication_fidoandauthentication_fido_clientno longer available on some platforms. Due to upgrading the libfido2 library bundled with the server to version 1.13.0, which requires OpenSSL 1.1.1 or higher, theauthentication_fidoandauthentication_fido_clientauthentication plugins are no longer available on Enterprise Linux 6, Enterprise Linux 7, Solaris 11, or SUSE Enterprise Linux 12.命令行选项不允许为 NULL。 在命令行上将服务器变量设置为 SQL
NULL是不支持的。在 MySQL 8.4 中,明确禁止将其中任何一个设置为NULL,尝试这样做会导致错误。NULL disallowed for command-line options. Setting server variables equal to SQLNULLon the command line is not supported. In MySQL 8.4, setting any of these toNULLis specifically disallowed, and attempting to do is rejected with an error.以下变量不受此限制:
admin_ssl_ca,admin_ssl_capath,admin_ssl_cert,admin_ssl_cipher,admin_tls_ciphersuites,admin_ssl_key,admin_ssl_crl,admin_ssl_crlpath,basedir,character_sets_dir,ft_stopword_file,group_replication_recovery_tls_ciphersuites,init_file,lc_messages_dir,plugin_dir,relay_log,relay_log_info_file,replica_load_tmpdir,ssl_ca,ssl_capath,ssl_cert,ssl_cipher,ssl_crl,ssl_crlpath,ssl_key,socket,tls_ciphersuites,以及tmpdir.The following variables are excepted from this restriction:admin_ssl_ca,admin_ssl_capath,admin_ssl_cert,admin_ssl_cipher,admin_tls_ciphersuites,admin_ssl_key,admin_ssl_crl,admin_ssl_crlpath,basedir,character_sets_dir,ft_stopword_file,group_replication_recovery_tls_ciphersuites,init_file,lc_messages_dir,plugin_dir,relay_log,relay_log_info_file,replica_load_tmpdir,ssl_ca,ssl_capath,ssl_cert,ssl_cipher,ssl_crl,ssl_crlpath,ssl_key,socket,tls_ciphersuites, andtmpdir.另请参阅第 7.1.8 节“服务器系统变量”。See also Section 7.1.8, “Server System Variables”.
有关 MySQL 8.4 中更改的详细信息,请参见 第 1.4 节,“自 MySQL 8.0 以来 MySQL 8.4 的新内容”。For additional information about changes in MySQL 8.4, see Section 1.4, “What Is New in MySQL 8.4 since MySQL 8.0”.
本节包含有关 MySQL 服务器系统变量的信息,这些变量在 MySQL 8.4 中的默认值与 MySQL 8.0 相比已经更改。This section contains information about MySQL server system variables whose default values have changed in MySQL 8.4 as compared to MySQL 8.0.
有关已添加的选项或变量的更多信息,请参见 MySQL 8.4 的选项和变量更改,在 MySQL 服务器版本参考 中。For more information about options or variables which have been added, see Option and Variable Changes for MySQL 8.4, in the MySQL Server Version Reference.
虽然新的默认设置对于大多数使用场景来说是最佳配置选择,但仍有特殊情况,以及出于兼容旧系统的原因可能需要使用现有的配置选择。例如,有些人希望尽可能少地对他们的应用程序或操作环境进行更改就升级到 MySQL 8.4。我们建议评估所有新的默认设置,并尽可能多地使用它们。Although the new defaults are the best configuration choices for most use cases, there are special cases, as well as legacy reasons for using existing configuration choices. For example, some people prefer to upgrade to MySQL 8.4 with as few changes to their applications or operational environment as possible. We recommend to evaluate all the new defaults and use as many as you can.
性能模式 variables_info 表显示了每个系统变量最近一次设置的来源,以及其取值范围。这提供了对系统变量及其值的所有信息的 SQL 访问。The Performance Schema
variables_info table shows, for
each system variable, the source from which it was most recently
set, as well as its range of values. This provides SQL access to
all there is to know about a system variable and its values.