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) #10896

Merged
merged 5 commits into from
Jun 27, 2019

Conversation

SunRunAway
Copy link
Contributor

@SunRunAway SunRunAway commented Jun 20, 2019

What problem does this PR solve?

  • It's a patch for 2.1

Show Mem column in SELECT * FROM information_schema.processlist; and also in show processlist; for compatibility.

What is changed and how it works?

Add a column describing memory usage for table information_schema.processlist and show processlist.

mysql> SELECT * FROM information_schema.processlist;
+------+------+-----------+------+---------+------+-------+----------------------------------------------+--------+
| ID   | USER | HOST      | DB   | COMMAND | TIME | STATE | INFO                                         | MEM    |
+------+------+-----------+------+---------+------+-------+----------------------------------------------+--------+
|    2 | root | 127.0.0.1 | test | Query   |    0 | 2     | SELECT * FROM information_schema.processlist |      0 |
|    1 | root | 127.0.0.1 | test | Sleep   | 1410 | 2     |                                              | 694966 |
+------+------+-----------+------+---------+------+-------+----------------------------------------------+--------+
2 rows in set (0.00 sec)

mysql> show processlist;
+------+------+-----------+------+---------+------+-------+------------------+--------+
| Id   | User | Host      | db   | Command | Time | State | Info             | Mem    |
+------+------+-----------+------+---------+------+-------+------------------+--------+
|    1 | root | 127.0.0.1 | test | Sleep   | 1414 | 2     |                  | 694966 |
|    2 | root | 127.0.0.1 | test | Query   |    0 | 2     | show processlist |      0 |
+------+------+-----------+------+---------+------+-------+------------------+--------+
2 rows in set (0.00 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

…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
Copy link
Contributor Author

/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@SunRunAway
Copy link
Contributor Author

/run-mybatis-test

@SunRunAway
Copy link
Contributor Author

/run-mybatis-test tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@SunRunAway
Copy link
Contributor Author

/run-mybatis-test tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@XuHuaiyu
Copy link
Contributor

LGTM

@SunRunAway
Copy link
Contributor Author

/run-mybatis-test tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

executor/aggregate_test.go Show resolved Hide resolved
planner/core/planbuilder.go Outdated Show resolved Hide resolved
@SunRunAway
Copy link
Contributor Author

@XuHuaiyu @zz-jason PTAL again. Description of this issue is updated.

@SunRunAway
Copy link
Contributor Author

/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@SunRunAway
Copy link
Contributor Author

/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

@SunRunAway
Copy link
Contributor Author

/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1

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 merged commit daea7cb into pingcap:release-2.1 Jun 27, 2019
@SunRunAway SunRunAway deleted the release-2.1-c branch October 17, 2019 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants