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


MySQL 9.0 參考手冊  /  ...  /  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 |
+-------------------+