26.4.5.13 ps_is_thread_instrumented()函数
返回YES
或NO
以指示是否为给定的连接 ID 启用了性能模式检测;如果 ID 未知,则返回UNKNOWN
;如果 ID 为NULL
则返回NULL
。
Parameters
in_connection_id BIGINT UNSIGNED
:连接 ID。这是 Performance Schema threadstable 的PROCESSLIST_ID
列或SHOW PROCESSLIST输出的Id
列中给定类型的值。
Return Value
ENUM('YES','NO','UNKNOWN')
值。
Example
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 |
+------------------------------------------------+