ps_thread_account()函数
给定一个Performance Schema线程ID,返回与该线程关联的帐户。user_name@host_name
参量
in_thread_id BIGINT UNSIGNED
:要为其返回帐户的线程ID。该值应与THREAD_ID
某些“性能模式”threads
表行中的列匹配。
返回值
一个TEXT
值。
例
mysql>SELECT sys.ps_thread_account(sys.ps_thread_id(CONNECTION_ID())); +---------------------------------------------------------- + | sys.ps_thread_account(sys.ps_thread_id(CONNECTION_ID())) | +---------------------------------------------------------- + | root@localhost | +---------------------------------------------------------- +