pingcap/tidb

Enlarge `state` field from `information_schema.processlist`

Open

#28,311 opened on Sep 24, 2021

View on GitHub
 (3 comments) (0 reactions) (1 assignee)Go (40,090 stars) (6,186 forks)batch import
compatibility-mysql8help wantedseverity/minorsig/sql-infratype/bug

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> desc information_schema.processlist;
+----------+---------------------+------+------+---------+-------+
| Field    | Type                | Null | Key  | Default | Extra |
+----------+---------------------+------+------+---------+-------+
| ID       | bigint(21) unsigned | NO   |      | 0       |       |
| USER     | varchar(16)         | NO   |      |         |       |
| HOST     | varchar(64)         | NO   |      |         |       |
| DB       | varchar(64)         | YES  |      | NULL    |       |
| COMMAND  | varchar(16)         | NO   |      |         |       |
| TIME     | int(7)              | NO   |      | 0       |       |
| STATE    | varchar(7)          | YES  |      | NULL    |       |
| INFO     | longtext            | YES  |      | NULL    |       |
| DIGEST   | varchar(64)         | YES  |      |         |       |
| MEM      | bigint(21) unsigned | YES  |      | NULL    |       |
| DISK     | bigint(21) unsigned | YES  |      | NULL    |       |
| TxnStart | varchar(64)         | NO   |      |         |       |
+----------+---------------------+------+------+---------+-------+
12 rows in set (0.09 sec)

mysql> select state from information_schema.processlist;
+------------+
| state      |
+------------+
| autocommit |
+------------+

The column type of state is varchar(7) but the length of "autocommit" is 10.

2. What did you expect to see? (Required)

The length should be at least 20(ref).

3. What did you see instead (Required)

NA

4. What is your TiDB version? (Required)

commit f830d012d29c6add78053da4c8432275067aaae0 (HEAD)
Author: wjhuang2016 <huangwenjun1997@gmail.com>
Date:   Fri Sep 24 16:58:11 2021 +0800

    refine comment
    
    Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>

Contributor guide

Enlarge `state` field from `information_schema.processlist` · pingcap/tidb#28311 | Good First Issue