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

*: show correct result for system variable tidb_capture_plan_baselines #16013

Merged
merged 4 commits into from
Apr 3, 2020

Conversation

eurekaka
Copy link
Contributor

@eurekaka eurekaka commented Apr 2, 2020

What problem does this PR solve?

Problem Summary:

tidb_capture_plan_baselines is a [server | global] scope system variable actually, but we don't handle it correctly in show session variables like 'tidb_capture_plan_baselines' and select @@session.tidb_capture_plan_baselines.

Specifically, if we set this session variable to on in one session, and then re-launch this session, in the new session, we find that the variable is off, while actually in this TiDB process, the baseline capture is working.

What is changed and how it works?

What's Changed:

Show server scope value in show session variables / select @@session.tidb_capture_plan_baselines.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

N/A

Release note

@eurekaka eurekaka added type/bugfix This PR fixes a bug. component/bindinfo labels Apr 2, 2020
@eurekaka eurekaka requested review from a team as code owners April 2, 2020 09:04
@ghost ghost requested review from SunRunAway and winoros and removed request for a team April 2, 2020 09:04
@github-actions github-actions bot added sig/execution SIG execution sig/planner SIG: Planner labels Apr 2, 2020
@codecov
Copy link

codecov bot commented Apr 3, 2020

Codecov Report

Merging #16013 into master will not change coverage by %.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #16013   +/-   ##
===========================================
  Coverage   80.5339%   80.5339%           
===========================================
  Files           506        506           
  Lines        135482     135482           
===========================================
  Hits         109109     109109           
  Misses        17870      17870           
  Partials       8503       8503           

@eurekaka eurekaka requested review from zz-jason and lzmhhh123 April 3, 2020 03:06
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/LGT1 Indicates that a PR has LGTM 1. label Apr 3, 2020
Copy link
Contributor

@lzmhhh123 lzmhhh123 left a comment

Choose a reason for hiding this comment

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

LGTM

@lzmhhh123 lzmhhh123 added status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 3, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Apr 3, 2020

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/bindinfo sig/execution SIG execution sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants