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

*: support more system variables in statement summary (#15508) #15682

Merged
merged 2 commits into from
Mar 30, 2020

Conversation

djshow832
Copy link
Contributor

cherry-pick #15508 to release-4.0


What problem does this PR solve?

Problem Summary:max-stmt-count and max-sql-length were configurations in config file, but other configurations were system variables. It's not consistent and makes many users confused.

What is changed and how it works?

What's Changed:

  1. Also support system variables tidb_stmt_summary_max_stmt_count and tidb_stmt_summary_max_sql_length.
  2. Global default value is '', not the same with config value.

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • PR to update pingcap/tidb-ansible:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
mysql> set global tidb_stmt_summary_max_stmt_count=50;
Query OK, 0 rows affected (0.00 sec)

mysql> select @@tidb_stmt_summary_max_stmt_count;
+------------------------------------+
| @@tidb_stmt_summary_max_stmt_count |
+------------------------------------+
| 50                                 |
+------------------------------------+
1 row in set (0.00 sec)

mysql> set global tidb_stmt_summary_max_sql_length=50;
Query OK, 0 rows affected (0.00 sec)

mysql> select @@tidb_stmt_summary_max_sql_length;
+------------------------------------+
| @@tidb_stmt_summary_max_sql_length |
+------------------------------------+
| 50                                 |
+------------------------------------+
1 row in set (0.00 sec)

Side effects

N/A

Release note

  • Statement summary: support system variables tidb_stmt_summary_max_stmt_count and tidb_stmt_summary_max_sql_length.

Copy link
Contributor

@Deardrops Deardrops 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
Contributor

@lonng lonng left a comment

Choose a reason for hiding this comment

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

LGTM

@lonng
Copy link
Contributor

lonng commented Mar 26, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 26, 2020

Sorry @lonng, you don't have permission to trigger auto merge event on this branch.

@bb7133
Copy link
Member

bb7133 commented Mar 26, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Mar 26, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Mar 26, 2020

/run-all-tests

@zz-jason zz-jason added the status/LGT2 Indicates that a PR has LGTM 2. label Mar 30, 2020
@zz-jason
Copy link
Member

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

/run-all-tests

@sre-bot sre-bot merged commit 3ea709e into pingcap:release-4.0 Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config component/infoschema sig/execution SIG execution sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants