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