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

tidb-server: set TiDBMemQuotaQuery to the value in configuration file #7729

Merged
merged 3 commits into from
Sep 17, 2018

Conversation

XuHuaiyu
Copy link
Contributor

What problem does this PR solve?

select @@tidb_mem_quota_query; gets the default value of TiDBMemQuotaQuery but
not the value configured in the configuration file.

What is changed and how it works?

Update the SysVar when starting the tidb-server.

Check List

  • Manual test (add detailed scripts or steps below)
    Set the mem-quota-query in the confiuration file to a value like 100000, then
    select @@tidb_mem_quota_query from the mysql-client.

Code changes

  • Has exported function/method change

Side effects
none

Related changes

  • Need to cherry-pick to the release branch

@XuHuaiyu XuHuaiyu added type/bugfix This PR fixes a bug. sig/execution SIG execution labels Sep 17, 2018
@CLAassistant
Copy link

CLAassistant commented Sep 17, 2018

CLA assistant check
All committers have signed the CLA.

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

@@ -388,6 +388,9 @@ func setGlobalVars() {
plan.AllowCartesianProduct = cfg.Performance.CrossJoin
privileges.SkipWithGrant = cfg.Security.SkipGrantTable

variable.SysVars[variable.TIDBMemQuotaQuery].Value = strconv.FormatInt(cfg.MemQuotaQuery, 10)
variable.SysVars["lower_case_table_names"].Value = strconv.Itoa(cfg.LowerCaseTableNames)
Copy link
Member

Choose a reason for hiding this comment

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

Why move this ahead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just because that they are both set a value to variable.Sysvar.

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

@coocood
Copy link
Member

coocood commented Sep 17, 2018

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution 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