cluster_processlist查看info信息

请问,execute状态的info信息是null,这种怎么查看当前执行的sql是什么呢。


尝试用
select tidb_decode_sql_digests( concat(‘'["’,digest,‘"]'’) ) from information_schema.cluster_processlist limit 1;
不过报错
MySQL> select tidb_decode_sql_digests( concat(‘'["’,digest,‘"]'’) ) from information_schema.cluster_processlist limit 1;
±--------------------------------------------------------+
| tidb_decode_sql_digests( concat(‘'["’,digest,‘"]'’) ) |
±--------------------------------------------------------+
| NULL |
±--------------------------------------------------------+
1 row in set, 1 warning (0.003 sec)
MySQL > show warnings;
±--------±-----±----------------------------------------------------------------------------------------+
| Level | Code | Message |
±--------±-----±----------------------------------------------------------------------------------------+
| Warning | 1210 | The argument can’t be unmarshalled as JSON array: ‘’["f1808cf7433c3641b0b4d6bfc44ae…’ |
±--------±-----±----------------------------------------------------------------------------------------+

1 个赞



参考一下
https://docs.pingcap.com/zh/tidb/stable/statement-summary-tables#statements_summary
https://docs.pingcap.com/zh/tidb/stable/statement-summary-tables#参数配置

我一般查这个表都只看command类型为query的记录,应该是query命令才会记录sql语句到info列吧。看了一下源码,好像execute的就是没记录语句

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。