MySQL 9.0 發行說明
傳回指定執行緒 ID 在 Performance Schema 內的 JSON 格式化陳述式、階段和事件堆疊。
in_thread_id BIGINT
:要追蹤的執行緒 ID。此值應與某些 Performance Schema 的threads
表格列的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:
...