Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Host and Info column of show processlist are not same as mysql #10903

Closed
SunRunAway opened this issue Jun 21, 2019 · 5 comments · Fixed by #22707
Closed

The Host and Info column of show processlist are not same as mysql #10903

SunRunAway opened this issue Jun 21, 2019 · 5 comments · Fixed by #22707
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/P4 Minor issue, awaiting more evidence before prioritizing type/compatibility type/enhancement The issue or PR belongs to an enhancement.

Comments

@SunRunAway
Copy link
Contributor

SunRunAway commented Jun 21, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

open 2 mysql client and run show processlists; both.

  1. What did you expect to see?

The Info column of show processlist should be NULL if it is not executing any statement.
See https://dev.mysql.com/doc/refman/5.5/en/processlist-table.html

The statement the thread is executing, or NULL if it is not executing any statement.

The Host column should be host_name:client_port format.

The host name of the client issuing the statement (except for system user, for which there is no host). The host name for TCP/IP connections is reported in host_name:client_port format to make it easier to determine which client is doing what.

mysql> show processlist;
+----+------+-----------------+------+---------+------+----------+------------------+
| Id | User | Host            | db   | Command | Time | State    | Info             |
+----+------+-----------------+------+---------+------+----------+------------------+
| 13 | root | localhost:53239 | test | Sleep   |   15 |          | NULL             |
| 14 | root | localhost:53268 | test | Query   |    0 | starting | show processlist |
+----+------+-----------------+------+---------+------+----------+------------------+
2 rows in set (0.00 sec)


  1. What did you see instead?
mysql> show processlist;
+------+------+-----------+------+---------+------+-------+------------------+
| Id   | User | Host      | db   | Command | Time | State | Info             |
+------+------+-----------+------+---------+------+-------+------------------+
|    1 | root | 127.0.0.1 | test | Query   |    0 | 2     | show processlist |
|    2 | root | 127.0.0.1 | test | Sleep   |    2 | 2     |                  |
+------+------+-----------+------+---------+------+-------+------------------+
2 rows in set (0.00 sec)
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

Release Version: v3.0.0-rc.1-221-g5cd77cdc8
Git Commit Hash: 5cd77cd
Git Branch: master
UTC Build Time: 2019-06-21 10:26:09
GoVersion: go version go1.12.1 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false

@SunRunAway SunRunAway changed the title The info column of show processlist should be NULL if it is not executing any statement. The Host and Info column of show processlist are not same as mysql Jun 21, 2019
@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Jul 1, 2019

partly fixed in #10985

@SunRunAway
Copy link
Contributor Author

SunRunAway commented Jul 1, 2019

The Host column should be host_name:client_port format.

Has it been fixed?

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Jul 1, 2019

@SunRunAway It will be fixed in another PR.

@XuHuaiyu XuHuaiyu added the type/enhancement The issue or PR belongs to an enhancement. label Jul 2, 2019
@ghost
Copy link

ghost commented Aug 4, 2020

Confirming this issue still exists in master:

mysql> show processlist;
+------+------+-----------+------+---------+------+------------+------------------+
| Id   | User | Host      | db   | Command | Time | State      | Info             |
+------+------+-----------+------+---------+------+------------+------------------+
|   21 | root | 127.0.0.1 | test | Query   |    0 | autocommit | show processlist |
+------+------+-----------+------+---------+------+------------+------------------+
1 row in set (0.00 sec)

mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-870-g2a8b96845
Edition: Community
Git Commit Hash: 2a8b968453520e4fcf9d6ff46c9f23b4ad23feee
Git Branch: master
UTC Build Time: 2020-07-31 08:45:35
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)

@ghost ghost added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Aug 4, 2020
@ghost ghost added the priority/P4 Minor issue, awaiting more evidence before prioritizing label Aug 12, 2020
@clark1013
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. priority/P4 Minor issue, awaiting more evidence before prioritizing type/compatibility type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants