MySQL 8.4 Release Notes
30.4.5.16 PS_thread_stack()函数
返回一个JSON格式的线程栈,包含了Performance Schema中关于给定线程ID的所有语句、阶段和事件。
-
in_thread_id BIGINT
: 需要跟踪的线程ID。该值应该与threads
表中的THREAD_ID
列相匹配。 -
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.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:
...