Skip to content

Commit

Permalink
*: fix sysvar inconsistencies/potential bugs (#24964)
Browse files Browse the repository at this point in the history
  • Loading branch information
morgo authored Jun 1, 2021
1 parent 02b4f3b commit 8dc2119
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -2349,7 +2349,7 @@ func BootstrapSession(store kv.Storage) (*domain.Domain, error) {
newCfg := *(config.GetGlobalConfig())
newCfg.MemQuotaQuery = newMemoryQuotaQuery
config.StoreGlobalConfig(&newCfg)
variable.SetSysVar(variable.TIDBMemQuotaQuery, strconv.FormatInt(newCfg.MemQuotaQuery, 10))
variable.SetSysVar(variable.TiDBMemQuotaQuery, strconv.FormatInt(newCfg.MemQuotaQuery, 10))
}
newOOMAction, err := loadDefOOMAction(se)
if err != nil {
Expand Down
14 changes: 7 additions & 7 deletions sessionctx/variable/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ func (*testSessionSuite) TestSetSystemVariable(c *C) {
{variable.TimeZone, "xyz", true},
{variable.TiDBOptAggPushDown, "1", false},
{variable.TiDBOptDistinctAggPushDown, "1", false},
{variable.TIDBMemQuotaQuery, "1024", false},
{variable.TIDBMemQuotaHashJoin, "1024", false},
{variable.TIDBMemQuotaMergeJoin, "1024", false},
{variable.TIDBMemQuotaSort, "1024", false},
{variable.TIDBMemQuotaTopn, "1024", false},
{variable.TIDBMemQuotaIndexLookupReader, "1024", false},
{variable.TIDBMemQuotaIndexLookupJoin, "1024", false},
{variable.TiDBMemQuotaQuery, "1024", false},
{variable.TiDBMemQuotaHashJoin, "1024", false},
{variable.TiDBMemQuotaMergeJoin, "1024", false},
{variable.TiDBMemQuotaSort, "1024", false},
{variable.TiDBMemQuotaTopn, "1024", false},
{variable.TiDBMemQuotaIndexLookupReader, "1024", false},
{variable.TiDBMemQuotaIndexLookupJoin, "1024", false},
{variable.TiDBMemQuotaApplyCache, "1024", false},
{variable.TiDBEnableStmtSummary, "1", false},
}
Expand Down
Loading

0 comments on commit 8dc2119

Please sign in to comment.