MySQL 9.0 发行说明
返回 Performance Schema 中给定线程 ID 的所有语句、阶段和事件的 JSON 格式堆栈。
in_thread_id BIGINT
:要跟踪的线程的 ID。该值应与某些 Performance Schemathreads
表行的THREAD_ID
列匹配。in_verbose BOOLEAN
:是否在事件中包含file:lineno
信息。
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.4.0-tr",
"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:
...