ps_is_thread_instrumented()函数
返回YES
或NO
指示是否为给定的连接ID启用了Performance Schema工具,UNKNOWN
如果该ID是未知的,或者NULL
该ID是NULL
。
参量
in_connection_id BIGINT UNSIGNED
:连接ID。这是PROCESSLIST_ID
在性能模式threads
表的Id
列或SHOW PROCESSLIST
输出的列中给定的类型的值。
返回值
一个ENUM('YES','NO','UNKNOWN')
值。
例
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 | +------------------------------------------------ +