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

sessionctx/variable: fix select variable return wrong result when variable is only global scope variable #8968

Merged
merged 6 commits into from
Jan 8, 2019

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented Jan 7, 2019

What problem does this PR solve?

fix issue:#8967

What is changed and how it works?

Always get global value when the variable is only global scope.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

Related changes

  • Need to cherry-pick to the release branch

This change is Reviewable

@crazycs520 crazycs520 changed the title sessionctx/variable: fix select variable return wrong result when var… sessionctx/variable: fix select variable return wrong result when variable is only global scope variable Jan 7, 2019
@crazycs520 crazycs520 requested a review from zimulala January 7, 2019 13:12
@crazycs520 crazycs520 added the type/bugfix This PR fixes a bug. label Jan 7, 2019
@crazycs520
Copy link
Contributor Author

@XuHuaiyu @zimulala PTAL

@crazycs520
Copy link
Contributor Author

/run-all-tests

@codecov-io
Copy link

codecov-io commented Jan 7, 2019

Codecov Report

Merging #8968 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8968      +/-   ##
==========================================
- Coverage   67.53%   67.52%   -0.02%     
==========================================
  Files         363      363              
  Lines       75241    75241              
==========================================
- Hits        50817    50808       -9     
- Misses      19936    19943       +7     
- Partials     4488     4490       +2
Impacted Files Coverage Δ
ddl/delete_range.go 74.28% <0%> (-4.58%) ⬇️
util/filesort/filesort.go 75.54% <0%> (-0.95%) ⬇️
executor/distsql.go 72.53% <0%> (-0.47%) ⬇️
executor/join.go 78.7% <0%> (+0.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 021f753...3a57309. Read the comment docs.

Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

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

LGTM

jackysp
jackysp previously approved these changes Jan 8, 2019
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@jackysp
Copy link
Member

jackysp commented Jan 8, 2019

/run-all-tests

1 similar comment
@jackysp
Copy link
Member

jackysp commented Jan 8, 2019

/run-all-tests

@XuHuaiyu XuHuaiyu dismissed jackysp’s stale review January 8, 2019 03:37

comment not addressed

@crazycs520
Copy link
Contributor Author

/run-all-tests

@crazycs520
Copy link
Contributor Author

/run-all-tests

@zz-jason zz-jason requested a review from XuHuaiyu January 8, 2019 07:11
@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Jan 8, 2019
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

@zz-jason zz-jason added status/LGT2 Indicates that a PR has LGTM 2. status/all tests passed and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jan 8, 2019
zz-jason pushed a commit that referenced this pull request Jan 8, 2019
@zz-jason
Copy link
Member

zz-jason commented Jan 8, 2019

@crazycs520 Should we cherry pick this change to release-2.1 and release-2.0?

@zz-jason zz-jason merged commit abf00fc into pingcap:master Jan 8, 2019
crazycs520 added a commit to crazycs520/tidb that referenced this pull request Jan 9, 2019
crazycs520 added a commit to crazycs520/tidb that referenced this pull request Jan 9, 2019
zz-jason pushed a commit that referenced this pull request Jan 10, 2019
zz-jason pushed a commit that referenced this pull request Jan 15, 2019
xhebox pushed a commit to xhebox/tidb that referenced this pull request Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression 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.

6 participants