• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • 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	|
    +----------------------------------------------------------	+