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

executor: fix show global variables return session variables also (#19341) #21045

Merged
merged 4 commits into from
Nov 17, 2020

Conversation

erwadba
Copy link
Contributor

@erwadba erwadba commented Nov 13, 2020

cherry-pick #19341 to release-4.0


What problem does this PR solve?

Issue Number: close #18517

Problem Summary: To fix show global variables statement return session variables.

What is changed and how it works?

What's Changed:
Rewrite the function fetchShowVariables() to distinguish global var from session var.
How it Works:

Related changes

n/a

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-993-g18b4e2b1a-dirty
Edition: Community
Git Commit Hash: 18b4e2b1a106d19db590da4af741e22ed08a5bf1
Git Branch: showvar
UTC Build Time: 2020-08-20 08:16:31
GoVersion: go1.13.8
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.04 sec)

mysql>  show global Variables like "tidb_mem_quota_topn";
Empty set (0.15 sec)

mysql> show  Variables like "tidb_mem_quota_topn";
+---------------------+-------------+
| Variable_name       | Value       |
+---------------------+-------------+
| tidb_mem_quota_topn | 34359738368 |
+---------------------+-------------+
1 row in set (0.01 sec)

mysql>

Side effects

n/a

Release note

  • fix show global variables return session variables also

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Nov 13, 2020

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

Or if the count of mainly changed packages are more than 3, use

  • *: what's changed

@github-actions github-actions bot added the sig/execution SIG execution label Nov 13, 2020
@erwadba erwadba changed the title Release 4.0 cc7a38327fca Release 4.0 cc7a38327fca fix conflict about cherry pick Nov 13, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Nov 13, 2020

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

Or if the count of mainly changed packages are more than 3, use

  • *: what's changed

@erwadba
Copy link
Contributor Author

erwadba commented Nov 13, 2020

/rebuild

@sre-bot
Copy link
Contributor

sre-bot commented Nov 13, 2020

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

Or if the count of mainly changed packages are more than 3, use

  • *: what's changed

@erwadba
Copy link
Contributor Author

erwadba commented Nov 13, 2020

/rebuild

@sre-bot
Copy link
Contributor

sre-bot commented Nov 13, 2020

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

Or if the count of mainly changed packages are more than 3, use

  • *: what's changed

@erwadba
Copy link
Contributor Author

erwadba commented Nov 13, 2020

/rebuild

@sre-bot
Copy link
Contributor

sre-bot commented Nov 13, 2020

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

Or if the count of mainly changed packages are more than 3, use

  • *: what's changed

@erwadba erwadba changed the title Release 4.0 cc7a38327fca fix conflict about cherry pick Release 4.0 cc7a38327fca fix: conflict in cherry pick Nov 13, 2020
@erwadba
Copy link
Contributor Author

erwadba commented Nov 13, 2020

/rebuild

@erwadba
Copy link
Contributor Author

erwadba commented Nov 13, 2020

@ti-srebot /run-all-test

@ti-srebot
Copy link
Contributor

/run-all-test

@XuHuaiyu XuHuaiyu changed the title Release 4.0 cc7a38327fca fix: conflict in cherry pick executor: fix show global variables return session variables also (#19341) Nov 16, 2020
Copy link
Contributor

@SunRunAway SunRunAway left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 17, 2020
Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 17, 2020
@qw4990
Copy link
Contributor

qw4990 commented Nov 17, 2020

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 21073
  • 21073
  • 21019
  • 21055
  • 20413
  • 21074

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 17, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants