View info information with cluster_processlist

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: cluster_processlist查看info信息

| username: TiDBer_wTKU9jv6

May I ask, if the info information in the execute state is null, how can I check the currently executing SQL?

I tried using:

select tidb_decode_sql_digests(concat('\'["', digest, '"]\')) from information_schema.cluster_processlist limit 1;

But it reported an error:

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...' |
+---------+------+-----------------------------------------------------------------------------------------+
| username: xfworld | Original post link

Refer to the following:

| username: Kongdom | Original post link

I usually only look at records with the command type “query” when checking this table. It should be the query command that records the SQL statement in the info column. I looked at the source code, and it seems that the execute command does not record the statement.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.