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 | +------------------------------------------------ +
