文件首頁
MySQL 8.4 參考手冊
相關文件 下載本手冊
PDF (美式信紙) - 39.9Mb
PDF (A4) - 40.0Mb
Man Pages (TGZ) - 258.5Kb
Man Pages (Zip) - 365.5Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 參考手冊  /  ...  /  ps_setup_disable_thread() 程序

30.4.4.7 ps_setup_disable_thread() 程序

給定連線 ID,停用該執行緒的 Performance Schema Instrumentation。產生一個結果集,指出有多少執行緒被停用。已停用的執行緒不會計入。

參數
  • in_connection_id BIGINT:連線 ID。這是 Performance Schema threads 表格中 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 |
+-------------------+