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

*: add a column describing memory usage for table information_schema.processlist #10837

Merged
merged 8 commits into from
Jun 20, 2019

Conversation

SunRunAway
Copy link
Contributor

@SunRunAway SunRunAway commented Jun 18, 2019

What problem does this PR solve?

Closes #10199

What is changed and how it works?

Add a column describing memory usage for table information_schema.processlist and keep show processlist acting as before.

mysql> SELECT * FROM information_schema.processlist;
+------+------+-----------+------+---------+------+-------+----------------------------------------------+------+
| ID   | USER | HOST      | DB   | COMMAND | TIME | STATE | INFO                                         | MEM  |
+------+------+-----------+------+---------+------+-------+----------------------------------------------+------+
|    1 | root | 127.0.0.1 | test | Query   |    1 | 2     | select * from t, ta                          |  856 |
|    2 | root | 127.0.0.1 | test | Query   |    0 | 2     | SELECT * FROM information_schema.processlist |    0 |
+------+------+-----------+------+---------+------+-------+----------------------------------------------+------+
2 rows in set (0.00 sec)

mysql> show processlist;
+------+------+-----------+------+---------+------+-------+----------------------+
| Id   | User | Host      | db   | Command | Time | State | Info                 |
+------+------+-----------+------+---------+------+-------+----------------------+
|    2 | root | 127.0.0.1 | test | Query   |    0 | 2     | show processlist     |
|    1 | root | 127.0.0.1 | test | Query   |    1 | 2     | select *  from t, ta |
+------+------+-----------+------+---------+------+-------+----------------------+
2 rows in set (0.01 sec)

Check List

Tests

  • Unit test
  • Manual test (see above)

Code changes

  • Has exported function/method change

Side effects

  • Increased code complexity

Related changes

  • Need to update the documentation
  • Need to be included in the release note?

This change is Reviewable

@codecov
Copy link

codecov bot commented Jun 18, 2019

Codecov Report

Merging #10837 into master will increase coverage by 0.0173%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##            master     #10837        +/-   ##
===============================================
+ Coverage   80.863%   80.8804%   +0.0174%     
===============================================
  Files          419        419                
  Lines        88661      88658         -3     
===============================================
+ Hits         71694      71707        +13     
+ Misses       11738      11725        -13     
+ Partials      5229       5226         -3

@SunRunAway
Copy link
Contributor Author

@zz-jason @XuHuaiyu PTAL

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SunRunAway
Copy link
Contributor Author

@XuHuaiyu sorry, PTAL again.

@SunRunAway SunRunAway requested a review from XuHuaiyu June 19, 2019 07:57
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Jun 20, 2019
@zz-jason
Copy link
Member

/run-all-tests

@SunRunAway
Copy link
Contributor Author

/rebuild

@SunRunAway SunRunAway merged commit 75b9470 into pingcap:master Jun 20, 2019
SunRunAway added a commit to SunRunAway/tidb that referenced this pull request Jun 20, 2019
….processlist (pingcap#10837)

     *: add a column describing memory usage for table information_schema.processlist

     Closes pingcap#10199

      Conflicts:
             executor/show.go
             infoschema/tables.go
             infoschema/tables_test.go
             util/misc_test.go
             util/processinfo.go
SunRunAway added a commit to SunRunAway/tidb that referenced this pull request Jun 20, 2019
…processlist (pingcap#10837)

*: add a column describing memory usage for table information_schema.processlist

Closes pingcap#10199
Conflicts:
     executor/show.go
     infoschema/tables.go
     infoschema/tables_test.go
     util/misc_test.go
     util/processinfo.go
sre-bot pushed a commit that referenced this pull request Oct 18, 2019
sre-bot added a commit to SunRunAway/tidb that referenced this pull request Oct 18, 2019
sre-bot added a commit to SunRunAway/tidb that referenced this pull request Oct 18, 2019
sre-bot added a commit to SunRunAway/tidb that referenced this pull request Oct 18, 2019
SunRunAway added a commit to SunRunAway/tidb that referenced this pull request Oct 18, 2019
eurekaka added a commit to SunRunAway/tidb that referenced this pull request Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2. type/new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support "SHOW PROCESSLIST MEMINFO"
3 participants