8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

MySQL 8.4 参考手册 / 28 个 INFORMATION_SCHEMA 表 / 28.5 INFORMATION_SCHEMA 的 Thread Pool 表
中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

28.5 INFORMATION_SCHEMA 线程池表28.5 INFORMATION_SCHEMA Thread Pool Tables

Note

INFORMATION_SCHEMA 线程池表已被弃用,并可能在 MySQL 的未来版本中被移除。您应改用作为 Performance Schema 表提供的版本。请参阅 第 29.12.16 节,“Performance Schema 线程池表”。应用程序应从旧表过渡到新表。例如,如果应用程序使用此查询:The INFORMATION_SCHEMA thread pool tables are deprecated, and subject to removal in a future version of MySQL. You should use the versions available as Performance Schema tables instead. See Section 29.12.16, “Performance Schema Thread Pool Tables”. Applications should transition away from the old tables to the new tables. For example, if an application uses this query:

SELECT * FROM INFORMATION_SCHEMA.TP_THREAD_STATE;

应用程序应改用此查询:The application should use this query instead:

SELECT * FROM performance_schema.tp_thread_state;

下面的各节描述了与线程池插件相关的 INFORMATION_SCHEMA 表(请参阅 第 7.6.3 节,“MySQL Enterprise 线程池”)。它们提供有关线程池操作的信息:The following sections describe the INFORMATION_SCHEMA tables associated with the thread pool plugin (see Section 7.6.3, “MySQL Enterprise Thread Pool”). They provide information about thread pool operation:

这些表中的行表示时间快照。对于 TP_THREAD_STATE 来说,同一线程组的所有行组成一个时间快照。因此,MySQL 服务器在生成快照时会持有该线程组的互斥锁。但它不会同时持有所有线程组的互斥锁,以防对 TP_THREAD_STATE 的操作阻塞整个 MySQL 服务器。Rows in these tables represent snapshots in time. In the case of TP_THREAD_STATE, all rows for a thread group comprise a snapshot in time. Thus, the MySQL server holds the mutex of the thread group while producing the snapshot. But it does not hold mutexes on all thread groups at the same time, to prevent a statement against TP_THREAD_STATE from blocking the entire MySQL server.

INFORMATION_SCHEMA 线程池表由各个插件实现,是否加载其中某一个表可以独立于其他表决定(参见 第 7.6.3.2 节,“线程池安装”)。然而,所有表的内容都依赖于线程池插件被启用。如果表插件启用但线程池插件未启用,该表虽然可见且可以访问,但内容为空。The INFORMATION_SCHEMA thread pool tables are implemented by individual plugins and the decision whether to load one can be made independently of the others (see Section 7.6.3.2, “Thread Pool Installation”). However, the content of all the tables depends on the thread pool plugin being enabled. If a table plugin is enabled but the thread pool plugin is not, the table becomes visible and can be accessed but is empty.