sys Schema Stored Functions *************************** 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
errors: 0
warnings: 0
lock time: ... { "error": "Trx info truncated: Row 6 was cut by GROUP_CONCAT()" } mysql>  SELECT sys.ps_thread_trx_info(48)\G *************************** 1. row *************************** sys.ps_thread_trx_info(48): [ { "time": "790.70 us", "state": "COMMITTED", "mode": "READ WRITE", "autocommitted": "NO", "gtid": "AUTOMATIC", "isolation": "REPEATABLE READ", "statements_executed": [ { "sql_text": "INSERT INTO info VALUES (1, \’foo\’)", "time": "471.02 us", "schema": "trx", "rows_examined": 0, "rows_affected": 1, "rows_sent": 0, "tmp_tables": 0, "tmp_disk_tables": 0, "sort_rows": 0, 5210 Example Return Value Configuration Options Parameters 28.4.5.17 The ps_thread_trx_info() Function Returns a JSON object containing information about a given thread. The information includes the current transaction, and the statements it has already executed, derived from the Performance Schema events_transactions_current  and  events_statements_history  tables. (The consumers for those tables must be enabled to obtain full data in the JSON object.) If the output exceeds the truncation length (65535 by default), a JSON error object is returned, such as: Similar error objects are returned for other warnings and exceptions raised during function execution. • in_thread_id BIGINT UNSIGNED : The thread ID for which to return transaction information. The value should match the  THREAD_ID  column from some Performance Schema  threads  table row. • ps_thread_trx_info.max_length ,  @sys.ps_thread_trx_info.max_length ps_thread_trx_info()  operation can be modified using the following configuration options or their corresponding user-defined variables (see Section 28.4.2.1, “The sys_config Table” ): The maximum length of the output. The default is 65535. A  LONGTEXT  value.