MySQL 8.4 Release Notes
30.4.4.7 PS_Setup_Disable_Thread过程
根据连接ID,禁用性能Schema的线程instrumentation。生成结果集,指示禁用了多少个线程。已经禁用的线程不计入统计。
-
in_connection_id BIGINT
: 连接ID。这是性能Schemathreads
表中的PROCESSLIST_ID
列或SHOW PROCESSLIST
输出中的Id
列的值。
根据连接ID禁用特定的连接:
mysql> CALL sys.ps_setup_disable_thread(225);
+-------------------+
| summary |
+-------------------+
| Disabled 1 thread |
+-------------------+
禁用当前连接:
mysql> CALL sys.ps_setup_disable_thread(CONNECTION_ID());
+-------------------+
| summary |
+-------------------+
| Disabled 1 thread |
+-------------------+