MySQL 8.4 發行說明
針對給定的執行緒 ID,傳回 Performance Schema 中所有陳述式、階段和事件的 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:
...