Open tangenta opened 3 years ago
on MySQL 8 the field is varchar(64)
.
mysql> explain information_schema.processlist;
+---------+-----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-----------------+------+-----+---------+-------+
| ID | bigint unsigned | NO | | | |
| USER | varchar(32) | NO | | | |
| HOST | varchar(261) | NO | | | |
| DB | varchar(64) | YES | | | |
| COMMAND | varchar(16) | NO | | | |
| TIME | int | NO | | | |
| STATE | varchar(64) | YES | | | |
| INFO | varchar(65535) | YES | | | |
+---------+-----------------+------+-----+---------+-------+
8 rows in set (0.00 sec)
Considering only the common fields
Field | TiDB 5.2 | MySQL 8.0 | MariaDB 10.4 | |
---|---|---|---|---|
ID | bigint unsigned | bigint unsigned | bigint | ✓ |
USER | varchar(16) | varchar(32) | varchar(128) | ✗ |
HOST | varchar(64) | varchar(261) | varchar(64) | ✓? |
DB | varchar(64) | varchar(64) | varchar(64) | ✓ |
COMMAND | varchar(16) | varchar(16) | varchar(16) | ✓ |
TIME | int | int | int | ✓ |
STATE | varchar(7) | varchar(64) | varchar(64) | ✗ |
INFO | longtext | varchar(65535) | longtext | ✓ |
Host was only recently expanded in https://github.com/pingcap/tidb/pull/27887
It might be worth checking if other infoschema tables mention host, since we missed this in the review.
The HOST thing was upgraded on the MySQL side in https://dev.mysql.com/worklog/task/?id=12571. Comparing with the WL list, at least the following tables are missed as of 9955eeebf:
HOST
, DEFAULT_ROLE_HOST
} (60 → 255)FROM_HOST
, TO_HOST
} (60 → 255)Grantor
(77 → 288)HOST
(60 → 255)GRANTEE
(81 → 288)GRANTEE
(81 → 288)GRANTEE
(81 → 288)GRANTEE
(81 → 288)there should be more since the WL doesn't list much information_schema
objects.
this should be filed into another issue?
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
The column type of
state
isvarchar(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)