说明:
MySQL 8.0.x小版本升级时,经常遇到因某个参数已经废弃删除,导致升级后的数据库无法正常启动,例如:
myisam_repair_threads 参数在8.0.29版本弃用,在8.0.30版本删除,那么如升级数据库版本>=8.0.30,需要提前检查是否存在这个参数,如果存在需要手动删除。
[ERROR][MY-000067][Server] unkown variable 'myisam_repair_threads=1'.
本文主要介绍2021年到2025年期间,也就是8.0.23到8.0.42版本已经废弃、删除的所有参数。
总结:
1:8.0.23版本弃用CHANGE MASTER TO 语句,用 SOURCE和REPLICA关键字 替换 MASTER 和 SLAVE;
2:8.0.23版本弃用 master_info_repository 和 relay_log_info_repository 参数,FILE选项被弃用;
3:8.0.23版本弃用FLUSH HOSTS语句;
4:8.0.26版本弃用transaction_write_set_extraction参数;
5:8.0.26版本弃用temptable_use_mmap参数;
6:8.0.27版本弃用default_authentication_plugin参数;
7:8.0.27版本弃用BINARY 运算符;
8:8.0.29版本弃用TIME, DATE, DATETIME, TIMESTAMP 和 DATETIME , TIMESTAMP 不标准的写法;
9:8.0.29版本弃用replica_parallel_type系统变量;
10:8.0.29版本弃用myisam_repair_threads , myisamchk --parallel-recover 系统变量;
11:8.0.29版本弃用query_prealloc_size 和 transaction_prealloc_size系统变量;
12:8.0.29版本弃用mysqld的 --abort-slave-event-count 和 --disconnect-slave-event-count 选项;
13:8.0.30版本删除myisam_repair_threads参数;
14:8.0.34版本弃用mysqlpump备份工具;
15:8.0.34版本弃用sync_relay_log_info系统变量;
16:8.0.34版本弃用binlog_format系统变量;
17:8.0.34版本弃用mysql_native_password 身份验证插件;
18:8.0.35版本弃用binlog_transaction_dependency_tracking;
19:8.0.35版本弃用--character-set-client-handshake;
20:8.0.35版本弃用INFORMATION_SCHEMA.PROCESSLIST ;
版本说明:
8.0.23
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-23.html
Changes in MySQL 8.0.23 (2021-01-18, General Availability)
Deprecation and Removal Notes
1.CHANGE MASTER TO 语句,弃用
从MySQL 8.0.23开始,不推荐使用 CHANGE MASTER TO 语句。应改用别名 CHANGE REPLICATION SOURCE TO 。
语句的参数也有别名,将MASTER替换为SOURCE。
例如,MASTER_HOST和MASTER_PORT现在可以输入为SOURCE_HOST和SOURCE_PORT。
START REPLICA|SLAVE语句的参数MASTER_LOG_POS和MASTER_LOG_FILE现在有别名SOURCE_LOG_POS和SOURCE_LOG_FILE。
这些语句的工作方式与以前相同,只是每个语句使用的术语都发生了变化。如果使用旧版本,则会发出弃用警告。
已添加新的状态变量 Com_change_replication_source 作为 Com_change_master 状态变量的别名。
新旧版本的语句都会更新新旧版本的状态变量。
服务器将查询日志中的所有CHANGE MASTER TO语句重写为CHANGE REPLICATION SOURCE TO语句。
对于 START SLAVE, STOP SLAVE, SHOW SLAVE STATUS, SHOW SLAVE HOSTS and RESET SLAVE的语句也是如此。
在语句历史表中,CHANGE MASTER TO语句的事件名称设置为statement/sql/change_replication_source。
2.gen_blacklist() 弃用
gen_blacklist() 用户定义函数已弃用。请改用 gen_blocklist() ,它执行相同的术语替换操作。
3.master_info_repository 和 relay_log_info_repository 弃用
系统变量 master_info_repository 和 relay_log_info_repository 的使用现在已被弃用,如果您尝试设置它们或读取它们的值,将发出警告消息。
系统变量将在未来的MySQL版本中删除。这些系统变量用于指定副本的连接元数据存储库和应用程序元数据存储库是写入mysql系统数据库中的InnoDB表,还是写入数据目录中的文件。
FILE设置在以前的版本中已经被弃用,表是MySQL 8.0中复制元数据存储库的默认值。
4.FLUSH HOSTS语句 弃用
刷新主机缓存可以使用以下任何方法完成:
(1)执行截断Performance Schema host_cache表的TRUNCATE TABLE语句。这需要表的DROP权限。
(2)执行FLUSH HOSTS语句。这需要RELOAD权限。
(3)执行mysqladmin flush-hosts命令。这需要RELOAD权限。
尽管这些方法在效果上是等效的,但授予RELOAD权限除了主机缓存刷新外,还可以执行许多其他操作,从安全角度来看,这是不可取的。
最好为host_cache表授予DROP权限,因为它的作用域更有限。因此,FLUSH HOSTS语句已被弃用,并将在未来的MySQL版本中删除。用truncate host_cache替代。
mysqladmin flush-hosts 之前执行了FLUSH HOSTS语句。现在,它试图截断host_cache表,只有在截断操作失败时才回退到FLUSH HOSTS。(WL#14329)
mysqladmin flush-hosts previously executed a FLUSH HOSTS statement. Now it attempts to truncate the host_cache table, falling back to FLUSH HOSTS only if the truncate operation fails. (WL #14329)
关键字 Deprecation 和 removed:
Group Replication: MySQL Server异步连接故障转移机制现在支持组复制拓扑,通过自动监视组成员资格的更改并区分主服务器和辅助服务器。
当您将组成员添加到源列表并将其定义为受管组的一部分时,异步连接故障转移机制会更新源列表,使其与成员资格更改保持一致,在组成员加入或离开时自动添加和删除组成员。
新的 asynchronous_connection_failover_add_managed() 和 asynchronous_connection_failover_delete_managed() 函数用于添加和删除托管源。
InnoDB: 启用撤消日志截断时更新频率很高,导致清除延迟。
延迟是由于当选择撤消表空间进行截断时,innodb_purge_rseg_truncate_frequency 设置暂时从128更改为1。
修改设置的代码已被删除。
Replication: 不再使用 asynchronous_connection_failover_add_source() 和 asynchronous_connection_failover_delete_source() 函数的network_namespace参数。
这些函数用于在异步连接故障转移机制的复制通道的源列表中添加和删除复制源服务器。复
制通道的网络命名空间使用 HANGE REPLICATION SOURCE 句进行管理,并且对组复制源服务器有特殊要求,因此不应再在函数中指定。
8.0.24
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html
Changes in MySQL 8.0.24 (2021-04-20, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
In addition, the servers instrument is a duplicate of servers_cache and has been removed.
Microsoft Windows: The /RTC1 compiler flag was removed from the debug compiler flags to reduce the time needed to run all tests invoked by the mysql-test-run.pl script when using MSVC on Windows. Initially, this compiler flag was introduced with the CMake program (by default for debug builds) and it generated code to test for stack corruption around function calls and the use of uninitialized variables at runtime. No loss of bug discovery is expected with the removal of the /RTC1 compiler flag. Memory errors, such as stack corruption, are more likely to be found by Address Sanitizer (ASAN) testing and the use of uninitialized variables are detected by compiler warnings. (Bug #32525732)
InnoDB: An unnecessary full flush list scan was removed, improving the speed with which session temporary tablespaces are created. Previously, depending on the size of the buffer pool and the number of dirty pages, creation of session temporary tablespaces could take a long time, affecting write transaction performance. (Bug #32423860)
InnoDB: The introduction of sharded rw_lock_stats counters in MySQL 5.7 caused a regression in CPU cache efficiency. To address this issue in MySQL 5.7, the sharding method was changed. For optimal performance, the rw_lock_stats counter is removed in MySQL 8.0. (Bug #32225367)
Replication: An assertion was raised in debug builds relating to lost GTIDs if binary log files were removed at startup because their retention period had expired. (Bug #32008512, Bug #101137)
8.0.25
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-25.html
Changes in MySQL 8.0.25 (2021-05-11, General Availability)
8.0.26
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-26.html
Changes in MySQL 8.0.26 (2021-07-20, General Availability)
Deprecation and Removal Notes
废弃和删除说明
1.TLSv1和TLSv1.1 废弃
TLSv1和TLSv1.1连接协议现在已弃用,在未来的MySQL版本中可能会删除对它们的支持。建议使用更安全的TLSv1.2和TLSv1.3协议进行连接。TLSv1.3要求MySQL服务器和客户端应用程序都使用OpenSSL 1.1.1或更高版本进行编译。
2.transaction_write_set_extraction 废弃
系统变量 transaction_write_set_extraction 现已弃用,如果您尝试设置或读取其值,将发出警告消息;预计它将在未来的MySQL版本中删除。
此系统变量用于具有多线程副本的复制源服务器,以指定用于对为事务的写入集提取的写入进行哈希的算法。
当不使用系统变量时,会选择XXHASH64算法,这是MySQL 8.0中的默认算法,也是组复制所必需的。
3.temptable_use_mmap 废弃
temptable_use_mmap 变量现在已弃用,并将在未来的MySQL版本中删除。
4. --ssl , --admin-ssl ,have_ssl ,have_openssl 废弃
MySQL中的 TLS 支持一直在向使用适用于不同安全端口或协议的命名TLS参数集的通道模型发展。例如,要查询特定TLS通道的状态,请使用Performance Schema tls_channel_status 表:
SELECT VALUE FROM performance_schema.tls_channel_status WHERE CHANNEL = 'mysql_main' AND PROPERTY = 'Enabled';
这使得整体上适用于TLS支持的单片参数不太适用,因此以下选项和系统变量现在已被弃用,并将在未来的MySQL版本中删除:
The --ssl and --admin-ssl server options.
The have_ssl and have_openssl system variables.
关键字 Deprecation 和 removed:
The dh-systemd package has been removed from Ubuntu 21.04, so the dependency on it has been removed from MySQL packages built for that distribution. (Bug #32688072)
InnoDB: The TRX_FORCE_ROLLBACK_ASYNC flag in the InnoDB sources, which indicates whether a transaction was rolled back asynchronously or by the owning thread, was found to be redundant and has been removed. (Bug #32912595)
InnoDB: Legacy UNIV_INLINE and UNIV_MATERIALIZE artifacts were removed from InnoDB sources. UNIV_HOTBACKUP was added to method declarations in some header files. (Bug #32894165)
InnoDB: The list of table locks requested by a transaction (trx->lock.table_locks), which is a subset of the transaction lock list (trx->lock.trx_locks), was removed. Table locks requested by a transaction are now are now listed at the beginning of the transaction lock list instead. (Bug #32762881)
InnoDB: The ut_allocator::construct() interface in the InnoDB sources, which is a custom interface implemented in a pre-C++11 style, caused unnecessary overhead. The interface was not necessary and has been removed. (Bug #32715381)
InnoDB: The ut_allocator() out of memory reporting mechanism in the InnoDB sources was not reliable and has been removed. (Bug #32715359)
InnoDB: A dependency related to redo and undo log encryption at server initialization time was removed. (Bug #32476724)
A common table expression which was used more than once in a statement, at least once within a subquery that was subsequently removed during resolution due to being always true, or always false. (Bug #32813547, Bug #32813554)
The impossible filter optimization removed MRR access paths that were required by the corresponding BKA access paths. (Bug #32787415)
MySQL source distributions now bundle the Google Test source code, which no longer need be downloaded to run Google Test-based unit tests. Consequently, the WITH_GMOCK and ENABLE_DOWNLOADS CMake options have been removed and are ignored if specified.
USING HASH was removed from the definitions of Performance Schema thread pool tables because the Performance Schema does not support hash indexes. (Bug #32194617)
While setting up ORDER BY for a window function, a window definition including a subquery was removed along with the subquery in the ORDER BY. (Bug #32103260)
8.0.27
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-27.html
Changes in MySQL 8.0.27 (2021-10-19, General Availability)
Deprecation and Removal Notes
1.default_authentication_plugin 废弃
重要更改:MySQL 8.0.27已弃用 default_authentication_plugin 变量;期望在MySQL的未来版本中删除对它的支持。
default_authentication_plugin 变量仍在MySQL 8.0.27中使用,但与新的 authentication_policy 系统变量结合使用,且优先级低于后者,后者在MySQL 8.0.21中引入了多因素身份验证功能。
2.BINARY 运算符 废弃
重要更改: BINARY 运算符现已弃用,并将在MySQL的未来版本中删除。现在使用BINARY会导致警告。请改用CAST(... AS BINARY)。
关键字 Deprecation 和 removed:
InnoDB: The unused os_event::event_iter field in the InnoDB sources was removed to reduce memory use in the os_event structure.
Default timestamp values have been removed from the following tables:
performance_schema.events_errors_summary_by_account_by_error
performance_schema.events_errors_summary_by_host_by_error
performance_schema.events_errors_summary_by_thread_by_error
performance_schema.events_errors_summary_by_user_by_error
performance_schema.events_errors_summary_global_by_error
performance_schema.events_statements_summary_by_digest
performance_schema.host_cache
performance_schema.replication_applier_filters
performance_schema.replication_applier_global_filters
Removed an unnecessary hard-coded dependency on the range optimizer from sql_help.cc. (Bug #32976042)
The query rewrite plugin failed when refreshing the rewrite rules and the table holding the rewrite rules contained rows that had been marked as deleted, but not physically removed.
8.0.28
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-28.html
Changes in MySQL 8.0.28 (2022-01-18, General Availability)
Deprecation and Removal Notes
1.TLSv1和TLSv1.1 删除
从MySQL 8.0.28开始,删除了对TLS v1.0和TLS v1.1连接协议的支持。MySQL 8.0.26已弃用这些协议。
使用更安全的TLSv1.2和TLSv1.3协议进行连接。TLSv1.3要求MySQL服务器软件和客户端应用程序都是用OpenSSL 1.1.1或更高版本编译的。
2.The shortcuts ASCII for CHARACTER SET latin1 and UNICODE for CHARACTER SET ucs2
字符集 latin1 的快捷方式 ASCII 和字符集 ucs2 的快捷方式 UNICODE 现在已被弃用,您应该期望在MySQL的未来版本中删除它们。现在,使用其中任何一种都会发出警告;请改用字符集。
3.ucs2,macroman and macce,dec,hp8
此处列出的字符集及其所有排序规则现已弃用,并将在MySQL的后续版本中删除:
ucs2
macroman and macce
dec
hp8
在SQL语句或MySQL服务器的其他地方使用这些字符集或其排序规则现在会产生弃用警告。
应该使用utf8mb4,而不是刚才列出的任何字符集。
关键字 Deprecation 和 removed:
8.0.29
Important
This release is no longer available for download. It was removed due to a critical issue that could cause data in InnoDB tables having added columns to be interpreted incorrectly. Please upgrade to MySQL 8.0.30 instead.
重要的
此版本不再可供下载。由于一个关键问题,它被删除了,该问题可能会导致InnoDB表中添加了列的数据被错误解释。请升级到MySQL 8.0.30。
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-29.html
Changes in MySQL 8.0.29 (2022-04-26, General Availability)
Deprecation and Removal Notes
1.TIME, DATE, DATETIME, TIMESTAMP 和 DATETIME , TIMESTAMP 不标准的写法 废弃
重要更改:以前,MySQL允许在TIME, DATE, DATETIME, TIMESTAMP文本中使用任意数量的分隔符,以及在 DATETIME 和 TIMESTAMP 文本的日期和时间值之前、之后和之间的任意数量的空格。
这种行为现在已被弃用,您应该期望在MySQL的未来版本中删除它。
在此版本中,使用任何非标准或多余的分隔符或空白字符现在都会触发一个警告,即日期时间值"value"中位置pos处的分隔符"char"是多余的,并且不推荐使用,后面是请删除,或者在可以建议适当替换的情况下,首选标准的"replacementchar"。
仅对文字值中遇到的第一个非标准分隔符或空白字符返回弃用警告。此处显示了一个示例:
mysql> SELECT DATE"2020/02/20";
+------------------+
| DATE"2020/02/20" |
+------------------+
| 2020-02-20 |
+------------------+
1 row in set, 1 warning (0.00 sec)
mysql> SHOW WARNINGS\G
*************************** 1. row ***************************
Level: Warning
Code: 4095
Message: Delimiter '/' in position 4 in datetime value '2020/02/20' at row 1 is
deprecated. Prefer the standard '-'.
1 row in set (0.00 sec)
2.Replication:replica_parallel_type 弃用
Replication:replica_parallel_type 系统变量现在已弃用;每当读取或设置此变量,或在my.cnf中设置等效选项时,服务器现在都会发出弃用警告,如下所示:
mysql> SELECT @@replica_parallel_type; SHOW WARNINGS\G
+-------------------------+
| @@replica_parallel_type |
+-------------------------+
| LOGICAL_CLOCK |
+-------------------------+
1 row in set, 1 warning (0.00 sec)
*************************** 1. row ***************************
Level: Warning
Code: 1287
Message: '@@replica_parallel_type' is deprecated and will be removed in a future
release.
1 row in set (0.00 sec)
3.myisam_repair_threads , myisamchk --parallel-recover 弃用
myisam_repair_threads 系统变量和 myisamchk --parallel-recover 选项已弃用;预计MySQL的未来版本中将删除对这两个版本的支持。
4. query_prealloc_size 和 transaction_prealloc_size 弃用
服务器系统变量 query_prealloc_size 和 transaction_prealloc_size 现在已被弃用,设置其中之一或两者在MySQL服务器中不再有任何效果。预计它们将在未来的MySQL版本中删除。
5.--abort-slave-event-count 和 --disconnect-slave-event-count 弃用
mysqld的 --abort-slave-event-count 和 --disconnect-slave-event-count 选项已被弃用,这些选项以前用于测试,通常在生产设置中不需要。
预计它们将在MySQL的未来版本中被删除。
关键字 Deprecation 和 removed:
The keyring_okv keyring plugin, which uses the Key Management Interoperability Protocol (KMIP) to communicate securely, is used with MySQL’s keyring service to store keyring data in a KMIP-compatible back end keyring storage product such as Oracle Key Vault, Gemalto SafeNet KeySecure Appliance, Townsend Alliance Key Manager, and Entrust KeyControl. The plugin now allows you to specify more than one standby server to provide backup connections to the back end keyring storage product if the primary server is unavailable. You can add up to 64 standby servers by editing the okvclient.ora file to specify the IP addresses and port numbers of the servers as a comma-separated list in the value of the STANDBY_SERVER variable. The plugin iterates over the standby servers until it can establish a connection, with a 20-second wait for each connection attempt. You should therefore ensure that the list of standby servers is kept short, accurate, and up to date, and servers that are no longer valid are removed, as they can significantly affect the keyring_okv plugin’s connection time and therefore the server startup time. (WL #14363)
InnoDB: The AIO synchronization queue used on Windows was removed. The synchronous file I/O read-write function (SyncFileIO::execute) was revised to handle files opened for both normal and overlapped I/O, as it does on Linux. (Bug #33840645)
InnoDB: A redundant and costly check was removed from the lock_sec_rec_read_check_and_lock lock system function, which is used to place a lock on a secondary index record. (Bug #33059387)
Redundant init and checkout_access_maps function code was removed from the Security_context class. (Bug #33339129, Bug #104915)
When removing a condition which was always true, a subquery referring to a view was removed even though the subquery was itself referred to elsewhere in the query. (Bug #31946448)
8.0.30
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-30.html
Changes in MySQL 8.0.30 (2022-07-26, General Availability)
Deprecation and Removal Notes
1.replica_parallel_workers
Replication: 现在不推荐将 replica_parallel_workers 系统变量(或等效的服务器选项 --replica-parallel-workers)设置为0,这样做会引发警告。
为了在没有警告的情况下实现相同的结果(即使用单线程),请将 replica_parallel_workers 设置为1。
2.--skip-host-cache 弃用
--skip-host-cache 服务器选项现已弃用,并将在未来的版本中删除。
请使用 SET GLOBAL host_cache_size = 0 这样的语句,或者在my.cnf文件中设置 host_cache_size。
3.--old-style-user-limits 弃用
--old-style-user-limits 选项使服务器强制执行MySQL 5.0.3之前的用户限制,旨在与非常旧的版本向后兼容。此选项现已弃用,现在使用它会发出警告。
Functionality Added or Changed
The myisam_repair_threads system variable and myisamchk --parallel-recover option were removed. (Bug #31052408, WL #14938)
将 8.0.27 升级到 8.0.33 时,因为 myisam_repair_thread 参数的影响,导致启动数据库失败:
MY-000067 unknown variable myisam_repair_thread
关键字 Deprecation 和 removed:
The myisam_repair_threads system variable and myisamchk --parallel-recover option were removed. (Bug #31052408, WL #14938)
InnoDB: The m_flush_bit in the redo log block header, which was set for the first block of multiple blocks written in a single log write call, provided no benefit and has been removed. (Bug #34091444)
InnoDB: A 4GB tablespace file size limit on Windows 32-bit systems has been removed. The limit was due to an incorrect calculation performed while extending the tablespace. (Bug #28934351)
Upgraded the bundled zlib library to zlib 1.2.12. Also made zlib 1.2.12 the minimum zlib version supported, and removed WITH_ZLIB from the WITH_SYSTEM_LIBS CMake option. (Bug #34015600)
8.0.31
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-31.html
Changes in MySQL 8.0.31 (2022-10-11, General Availability)
Deprecation and Removal Notes
1.keyring_oci 插件 弃用
keyring_oci 插件已被弃用,并将在MySQL的未来版本中删除。相反,考虑使用 component_keyring_oci 组件来存储keyring数据。
关键字 Deprecation 和 removed:
The audit_log_flush variable is deprecated as of MySQL 8.0.31; expect support for it to be removed in a future version of MySQL. (WL #15249)
Incompatible Change: The service pfs_plugin_table, deprecated since MySQL 8.0.14, is removed in this release.
Plugins or components using this service must be updated to use pfs_plugin_table_v1 and pfs_plugin_column_* instead. (Bug #34361827)
Removed GNU 'gold' linker support, including the associated USE_LD_GOLD CMake option. (Bug #34094324)
8.0.32
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-32.html
Changes in MySQL 8.0.32 (2023-01-17, General Availability)
Deprecation and Removal Notes
1.($)作为未加引号的标识符的第一个字符 弃用
现在不推荐使用美元符号($)作为未加引号的标识符的第一个字符,这会引发警告(ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT),并将在未来的版本中删除。
这会影响使用此类标识符作为任何数据库、表、视图、列、存储程序或别名名称的语句。
以美元符号开头的标识符仍然只允许在引用时使用,即根据服务器SQL mode,由单引号或双引号(' or ") 或回溯字符(`),分隔。示例:
mysql> TABLE $t; # Unquoted, produces warning
+------+
| a |
+------+
| 1 |
| 2 |
+------+
2 rows in set, 1 warning (0.00 sec)
mysql> SHOW WARNINGS\G
*************************** 1. row ***************************
Level: Warning
Code: 1681
Message: '$ as the first character of an unquoted identifier' is deprecated and
will be removed in a future release.
1 row in set (0.00 sec)
mysql> TABLE `$t`; # Quoted, no warning
+------+
| a |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.00 sec)
用户变量不受此更改的影响。例如,语句 SELECT 1 INTO @$x 不会产生警告。
2.CLIENT_NO_SCHEMA
CLIENT_NO_SCHEMA 标志已弃用。将 CLIENT_NO_SCHEMA 指定为mysql_real_connect()的 client_flag 参数的客户端程序现在可以省略该标志和db参数,使连接将数据库值设置为当前(或默认)数据库。
当使用 CLIENT_NO_SCHEMA 调用 mysql_real_connect() 时,libmysqlclient 库现在会打印一条关于标准错误的警告。
此外,如果连接具有 CLIENT_NO_SCHEMA ,则服务器会为执行的每个未准备好的查询添加弃用警告。
3.--compress 弃用
--compression 算法客户端选项允许弃用传统的 --compress 客户端选项和 Compression 状态变量。
MYSQL_OPT_COMPRESSION_ALGORITHMS C API选项启用旧版 MYSQL_OPT_COMPRESS C API选项的弃用。
CHANGE MASTER TO 语句的 MASTER_COMPRESSION_ALGORITHMS 选项允许弃用遗留的 slave_compressed_protocol 系统变量。
在未来的MySQL版本中,将删除已弃用的参数。
现在,当客户端用户使用 --compress (或-C,如果适用)调用其中一个程序时,以下客户端程序会打印一个弃用警告,显示标准错误:mysqlpump, mysqlcheck, mysql, mysqladmin, mysqlbinlog, mysqldump, mysqlimport, mysqlshow, mysqlslap, mysql_upgrade, and mysqltest.。
mysqlbackup --compress 选项具有不同的功能,并没有被弃用。
关键字 Deprecation 和 removed:
Removed the boost library usage from the plugins. (Bug #34694419)
Removed all 3rd party files named 'Makefile' as they were not used. (Bug #34648199)
Located and removed unused code; located it using fastcov. (Bug #34583577)
Replication: Removed an assert from sql/rpl_group_replication.cc which triggered a false error in testing. (Bug #34619134)
Removed an assertion in query_expression::assert_not_fully_clean(). (Bug #34526104)
8.0.33
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-33.html
Changes in MySQL 8.0.33 (2023-04-18, General Availability)
Deprecation and Removal Notes
1.User-defined collations 弃用
用户定义的排序规则现在已弃用。以下任一情况都会导致日志中写入警告:
(1)SQL语句中 COLLATE 后跟用户定义排序规则名称的任何出现。
(2)将用户定义的排序规则的名称用作collation_server, collation_database, or collation_connection。
您应该期望在MySQL的未来版本中删除对用户定义排序规则的支持。
关键字 Deprecation 和 removed:
Removed the deprecated Docs/mysql.info file from the build system. (Bug #34960126)
Removed several unmaintained or unused C++ source files for functionality such as uca-dump and uctypedump. (Bug #34898978)
Removed an assertion raised in certain cases by the RANDOM_BYTES() function in debug builds. (Bug #34781507)
8.0.34
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-34.html
Changes in MySQL 8.0.34 (2023-07-18, General Availability)
Deprecation and Removal Notes
1.mysqlpump 弃用
重要变化:由于MySQL提供了具有相同或附加功能的其他执行数据库转储和备份的方法,包括mysqldump和MySQL Shell实用程序, mysqlpump client实用程序已变得多余,现在已被弃用。现在调用此程序会产生警告。
您应该记住,mysqlpump在MySQL的未来版本中可能会被删除,并将依赖它的应用程序移动到另一个解决方案,例如前面提到的那些。
2.sync_relay_log_info 弃用
Replication:在此版本中, sync_relay_log_info 服务器系统变量已弃用,获取或设置此变量或其等效启动选项 --sync-relay-log-info 信息现在会发出警告。
预计在MySQL的未来版本中会删除此变量;在此之前,应该重写使用它的应用程序,使其不依赖于它。
2.binlog_format , log_bin_trust_function_creators , log_statements_unsafe_for_binlog
Replication: binlog_format 服务器系统变量现已弃用,并将在MySQL的未来版本中删除。与此变量相关的更改二进制日志格式的功能也已弃用。
这一变化的含义是,当删除 binlog_format 时,MySQL服务器将只支持MySQL 8.0中默认的基于行的二进制日志记录。
因此,新安装应仅使用基于行(row-based)的二进制日志记录,而使用基于语句(statement-based)或混合(mixed)日志记录格式的现有安装应迁移到基于行的格式。
系统变量 log_bin_trust_function_creators 和 log_statements_unsafe_for_binlog 仅在基于语句的日志记录上下文中有用,现在也被弃用,因此在MySQL的未来版本中也会被删除。
现在设置或选择刚才提到的任何变量的值都会发出警告。
3. group_replication_recovery_complete_at 弃用
Group Replication: group_replication_recovery_complete_at 服务器系统变量现已弃用,设置它会产生警告。您应该期望在MySQL的未来版本中删除它。
4.mysql_native_password 弃用
mysql_native_password 身份验证插件现在已弃用,并将在mysql的未来版本中删除。
如果帐户尝试使用 mysql_native_password 作为身份验证方法进行身份验证,则CREATE USER、ALTER USER和SET PASSWORD操作现在会在服务器错误日志中插入弃用警告。
5.audit_log 弃用
以前,如果安装的 audit_log 插件没有附带基于规则的过滤所需的审计表和函数,则该插件将在传统过滤模式下运行。
现在,传统的过滤模式已被弃用。对旧审计日志过滤系统变量发出新的弃用警告。
这些已弃用的变量要么是只读的,要么是动态的。
(Read-only) audit_log_policy 现在在服务器启动期间,当值不是ALL(默认值)时,会向MySQL服务器错误日志写入警告消息。
(Dynamic) audit_log_include_accounts, audit_log_exclude_accounts, audit_log_statement_policy, and audit_log_connection_policy.。动态变量根据使用情况打印警告消息:
在MySQL服务器启动期间向 audit_log_include_accounts 或 audit_log_exclude_accounts 传递非NULL值,现在会将警告消息写入服务器错误日志。
在MySQL服务器启动期间向 audit_log_statement_policy 或 audit_log_connection_policy 传递非默认值,现在会将警告消息写入服务器错误日志。ALL是这两个变量的默认值。
在MySQL客户端会话期间使用SET语法更改现有值现在会将警告消息写入客户端日志。
在MySQL客户端会话期间使用SET PERSIST语法持久化变量,现在会将警告消息写入客户端日志。
6.ssl_fips_mode 、--ssl-fips-mode 和 MYSQL_OPT_SSL_FIPS_MODE 弃用
MySQL允许使用系统变量和客户端选项在服务器端和客户端控制 FIPS 模式。
应用程序可以使用 mysql_options() 的 MYSQL_OPT_SSL_FIPS_MODE 选项在客户端启用FIPS模式。或者,可以直接通过OpenSSL配置文件处理FIPS模式,而不是使用当前的服务器端系统变量和客户端选项。
当MySQL使用OpenSSL 3.0编译,并且OpenSSL库和FIPS对象模块在运行时可用时,服务器会读取OpenSSL配置文件,并尊重使用FIPS提供程序的首选项(如果已设置)。OpenSSL 3.0已通过FIPS认证。
为了支持OpenSSL的替代方案, ssl_fips_mode 服务器系统变量、--ssl-fips-mode 客户端选项和 MYSQL_OPT_SSL_FIPS_MODE 选项现在已被弃用,并将在MYSQL的未来版本中删除。
当应用程序使用 MYSQL_OPT_SSL_FIPS_MODE 选项时,或者当客户端用户在命令行上、通过选项文件或两者同时指定--SSL-FIPS模式选项时,会在标准错误输出中打印弃用警告。
在弃用之前, ssl_fips_mode 服务器端系统变量是可动态设置的。
它现在是一个只读变量(接受SET PERSIST_ONLY,但不接受SET PERIST或SET GLOBAL)。
在命令行或mysqld-auto.cnf选项文件(使用SET PERSIST_ONLY)中指定时,会在服务器错误日志中打印弃用警告。
7.mysql_ssl_rsa_setup 弃用
如果系统上安装了OpenSSL, mysql_ssl_rsa_setup 程序最初为社区用户提供了一种手动生成证书的简单方法。
现在, mysql_ssl_rsa_setup 已被弃用,因为mysql社区版不再支持使用yaSSL作为ssl库,源代码发行版也不再包含yaSSL。
相反,使用MySQL服务器在启动时自动生成丢失的SSL和RSA文件。
8.keyring_file 和 keyring_encrypted_file 弃用
keyring_file 和 keyring_encrypted_file 插件现在已弃用。这些密钥环插件被 component_keyring_file 和 component_keyring_encrypted_file 组件所取代。
9.version-specific comment
以前,MySQL Server处理特定于版本(version-specific)的注释,而不考虑其中包含的MySQL版本号后面是否有空格。
例如,注释 /*!80034KEY_BLOCK_SIZE=1024*/ 和 /*!80034 KEY_BLOCK_SIZE=1024*/ 的处理方式相同。
从这个版本开始,当这样的注释中版本号后面的下一个字符既不是空白字符也不是注释的末尾时,Server会发出警告:在版本号被弃用后立即开始版本注释,并可能在未来的版本中改变行为。请在版本号后插入空白字符。
您应该期望在MySQL的未来版本中严格执行特定于版本的注释的空格要求。
10.MYSQL_OPT_RECONNECT 弃用
MySQL client 库目前支持在发现连接已断开并且应用程序试图向服务器发送要执行的语句时自动重新连接到服务器。
现在,此功能已被弃用,并将在MySQL的未来版本中删除。
相关的 MYSQL_OPT_RECONNECT 选项仍然可用,但也已弃用。当应用程序指定 MYSQL_OPT_RECONNECT 时,C API函数mysql_get_option() 和 mysql_options()现在将向标准错误输出写入弃用警告。
关键字 Deprecation 和 removed:
Removed the unused extra/libcbor/doc/ directory as extra/libcbor/doc/source/requirements.txt inspired bogus pull requests on GitHub. (Bug #35433370)
Group Replication: Removed a memory leak discovered in Network_provider_manager::open_xcom_connection(). (Bug #34991101)
Removed the clang-tidy checks that clash with the MySQL coding style. (Bug #35208735)
8.0.35
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-35.html
Changes in MySQL 8.0.35 (2023-10-25, General Availability)
Deprecation and Removal Notes
1. binlog_transaction_dependency_tracking 弃用
Replication: The binlog_transaction_dependency_tracking 服务器系统变量现已弃用,并将在MySQL的未来版本中删除。
现在,设置或检索此变量的值会触发警告,使用等效的启动选项 --binlog-transaction-dependency-tracking 也会触发警告。
依赖于此变量(或选项)的应用程序应尽快开始迁移。没有计划或需要替换此变量或其功能。
2.old 和 new server system variables
old 和 new server system variables 现在已弃用,每当设置或读取这些变量时,都会发出警告。
预计这些变量将在MySQL的未来版本中删除;
3.--character-set-client-handshake 弃用
--character-set-client-handshake 服务器选项最初用于从非常旧的MySQL版本升级,现在已被弃用,每次使用时都会发出警告。
4.数据库级别的%和_授权通配符 弃用
此版本中的两个更改会影响MySQL中的特权授予。
其中一项变化影响数据库授权;
另一个问题涉及授权中使用的主机名。以下列出了这些更改:
a.Database-level 授权。在数据库级授权中使用字符%和_作为通配符现在已被弃用,您应该期望在未来的MySQL版本中删除此通配符功能。
其目的是让这些字符始终被视为文字,因为只要 partial_revokes 服务器系统变量的值为ON,它们就已经是文字了。
例如,当 partial_revokes 设置为ON时, GRANT SELECT ON db_.* TO user1 允许user1从名为db_的数据库中的任何表中选择,但不允许user1在数据库db1、db2、dbx、dby等中的表中选择。一旦删除了对授权中数据库名称中通配符的支持,您应该期望情况总是如此。
b.授权中的主机名“%”。服务器在检查权限时将%视为localhost的同义词的做法现在也被弃用,因此在MySQL的未来版本中也会被删除。
目前,授予“user1”@“%”的特权也授予“user1@'localhost'”。此自动分配现已弃用;一旦删除了该行为,就必须始终使用localhost主机名显式地向“user1@'localhost'”授予权限。
注意:
在所列的两种情况下,用户会话或日志中都不会出现警告或错误,因为这样做可能会很快产生大量此类消息
5.INFORMATION_SCHEMA.PROCESSLIST 弃用
INFORMATION_SCHEMA.PROCESSLIST 已被弃用,并将在未来的MySQL版本中删除。
建议改用SHOW PROCESSIST的性能模式实现。因此, performance_schema_show_processlist 也被弃用,并将在未来的MySQL版本中删除。
6.TLS_AES_128_CCM_8_SHA256 弃用
对 TLS_AES_128_CCM_8_SHA256 密码套件的支持现在已被弃用,并将在MySQL的未来版本中删除。
现在,任何使用 tls_ciphersuites 或 admin_tls_ciphersuites 系统变量设置它的尝试都会返回警告。
默认情况下,两个系统变量都接受这些密码套件:
TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
TLS_AES_128_CCM_SHA256
一些以前支持的密码现在已被弃用,并将在MySQL的未来版本中删除。如果使用ssl_cipher或admin_ssl_cipher系统变量指定了弃用的密码,则现在会发出警告。
继续支持以下密码,但不会发出弃用警告:
ECDHE-ECDSA-AES128-GCM-SHA256
ECDHE-ECDSA-AES256-GCM-SHA384
ECDHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-ECDSA-CHACHA20-POLY1305
ECDHE-RSA-CHACHA20-POLY1305
ECDHE-ECDSA-AES256-CCM
ECDHE-ECDSA-AES128-CCM
DHE-RSA-AES128-GCM-SHA256
DHE-RSA-AES256-GCM-SHA384
DHE-RSA-AES256-CCM
DHE-RSA-AES128-CCM
DHE-RSA-CHACHA20-POLY1305
关键字 Deprecation 和 removed:
8.0.36
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-36.html
Changes in MySQL 8.0.36 (2024-01-16, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
Removed the CPACK_COMPONENT_GROUP_INFO_DISPLAY_NAME configuration option from the Windows installation MSI interface. Now the INFO_BIN and INFO_SRC files are always installed. (Bug #35529968)
Removed an assertion failure in sql/field.cc. (Bug #112503, Bug #35846221)
8.0.37
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-37.html
Changes in MySQL 8.0.37 (2024-04-30, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
无
8.0.38
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-38.html
Changes in MySQL 8.0.38 (2024-07-01, General Availability)
重要:
此版本不再可供下载。由于一个关键问题,它被删除,该问题可能会阻止服务器在创建大量表(8001个或更多)后重新启动。请升级到MySQL 8.0.39。
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
Group Replication: Removed a memory leak from /xcom/gcs_xcom_networking.cc. (Bug #36532199)
Removed a memory leak observed while running authentication_kerberos under Valgrind. (Bug #34482788, Bug #36570929)
8.0.39
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-39.html
Changes in MySQL 8.0.39 (2024-07-23, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
无
修复了重要的BUG:
InnoDB: In some cases, following the creation of a very large number of tables (8001 or more), the server could not be restarted successfully. (Bug #36808732)
References: This issue is a regression of: Bug #33398681.
8.0.40
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-40.html
Changes in MySQL 8.0.40 (2024-10-15, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
无
8.0.41
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-41.html
Changes in MySQL 8.0.41 (2025-01-21, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
无
8.0.42
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-42.html
Changes in MySQL 8.0.42 (2025-04-15, General Availability)
Deprecation and Removal Notes
无
关键字 Deprecation 和 removed:
Group Replication: OpenSSL 引擎接口已被弃用,包括 Fedora 在内的一些Linux发行版不再将其包含在OpenSSL v3主包中。
###chenjuchao 20250514###
欢迎关注我的公众号《IT小Chen》
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




