Navigation Menu

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

session, executor: support setting tidb_enable_stmt_summary in session scope (#12217) #12308

Merged
merged 1 commit into from Sep 23, 2019

Conversation

djshow832
Copy link
Contributor

cherry-pick #12217 to release-3.0, with little conflict-resolve


What problem does this PR solve?

Support setting tidb_enable_stmt_summary in session scope. It was only supported in global scope. Actually, session scope here equals server scope, and global scope here equals cluster scope.

What is changed and how it works?

When statement summary is enabled in global scope, it'll work immediately on the current server and work in 2 seconds on the other servers in the cluster.
When statement summary is enabled in session scope, it'll work immediately on the current server, and subsequent settings in the global scope won't work.
If tidb_enable_stmt_summary is set to '' in session scope, then tidb_enable_stmt_summary in global scope works in the current server.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Side effects

  • Possible performance regression
  • Increased code complexity

Related changes

  • Need to cherry-pick to the release branch

Release Note

  • Support system table performance_schema.events_statements_summary_by_digest. The table is used to summarize statements by digest of statements.

@djshow832
Copy link
Contributor Author

/run-all-tests

@coocood
Copy link
Member

coocood commented Sep 23, 2019

LGTM

Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

@bb7133 bb7133 added status/LGT2 Indicates that a PR has LGTM 2. status/can-merge Indicates a PR has been approved by a committer. labels Sep 23, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Sep 23, 2019

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

@winkyao winkyao merged commit f33c908 into pingcap:release-3.0 Sep 23, 2019
bb7133 added a commit to bb7133/tidb that referenced this pull request Sep 26, 2019
@djshow832
Copy link
Contributor Author

/run-cherry-picker

@sre-bot
Copy link
Contributor

sre-bot commented Sep 29, 2019

cherry pick to release-3.1 failed

djshow832 added a commit to djshow832/tidb that referenced this pull request Sep 30, 2019
@djshow832 djshow832 changed the title session, executor: support setting tidb_enable_stmt_summary in session scope #12217 session, executor: support setting tidb_enable_stmt_summary in session scope (#12217) Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/session component/util sig/execution SIG execution status/can-merge Indicates a PR has been approved by a committer. 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.

None yet

5 participants