MySQL 8.4 發行說明
傳回 YES
或 NO
,以表示是否啟用指定連線 ID 的 Performance Schema 檢測,如果 ID 未知則傳回 UNKNOWN
,如果 ID 為 NULL
則傳回 NULL
。
in_connection_id BIGINT UNSIGNED
:連線 ID。這是 Performance Schemathreads
資料表的PROCESSLIST_ID
欄位或SHOW PROCESSLIST
輸出的Id
欄位中給定的類型值。
mysql> SELECT sys.ps_is_thread_instrumented(43);
+-----------------------------------+
| sys.ps_is_thread_instrumented(43) |
+-----------------------------------+
| UNKNOWN |
+-----------------------------------+
mysql> SELECT sys.ps_is_thread_instrumented(CONNECTION_ID());
+------------------------------------------------+
| sys.ps_is_thread_instrumented(CONNECTION_ID()) |
+------------------------------------------------+
| YES |
+------------------------------------------------+