-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
There was a problem hiding this 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move this ahead?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
LGTM |
What problem does this PR solve?
select @@tidb_mem_quota_query;
gets the default value of TiDBMemQuotaQuery butnot the value configured in the configuration file.
What is changed and how it works?
Update the
SysVar
when starting the tidb-server.Check List
Set the
mem-quota-query
in the confiuration file to a value like 100000, thenselect @@tidb_mem_quota_query
from the mysql-client.Code changes
Side effects
none
Related changes