• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • ps_thread_stack()函数

    对于给定的线程ID,返回Performance Schema中所有语句,阶段和事件的JSON格式的堆栈。

    参量

    • in_thread_id BIGINT:要跟踪的线程的ID。该值应与THREAD_ID某些“性能模式”threads表行中的列匹配。
    • in_verbose BOOLEAN:是否file:lineno在事件中包括信息。

    返回值

    一个LONGTEXT CHARACTER SET latin1值。

    mysql> SELECT sys.ps_thread_stack(37, FALSE) AS thread_stack\G
    *************************** 1. row***************************
    thread_stack: {"rankdir": "LR","nodesep": "0.10",
    "stack_created": "2014-02-19 13:39:03", "mysql_version": "8.0.2-dmr-debug-log",
    "mysql_user": "root@localhost","events": [{"nesting_event_id": "0",
    "event_id": "10", "timer_wait": 256.35, "event_info": "sql/select",
    "wait_info": "select @@version_comment limit 1\nerrors: 0\nwarnings: 0\nlock time:
    ...