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

*: hide the config global-kill and session var tidb_enable_index_merge_join #23395

Merged
merged 6 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ type Experimental struct {
// Whether enable creating expression index.
AllowsExpressionIndex bool `toml:"allow-expression-index" json:"allow-expression-index"`
// Whether enable global kill.
EnableGlobalKill bool `toml:"enable-global-kill" json:"enable-global-kill"`
EnableGlobalKill bool `toml:"enable-global-kill" json:"-"`
}

var defTiKVCfg = tikvcfg.DefaultConfig()
Expand Down
2 changes: 0 additions & 2 deletions config/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,6 @@ history-size = 24
[experimental]
# enable creating expression index.
allow-expression-index = false
# enable global kill.
enable-global-kill = false

# server level isolation read by engines and labels
[isolation-read]
Expand Down
11 changes: 11 additions & 0 deletions executor/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,17 @@ func (s *testSuite5) TestInvisibleCoprCacheConfig(c *C) {
c.Assert(strings.Contains(configValue, coprCacheVal), Equals, true)
}

func (s *testSuite5) TestInvisibleGlobalKillConfig(c *C) {
se1, err := session.CreateSession(s.store)
c.Assert(err, IsNil)
tk := testkit.NewTestKitWithSession(c, s.store, se1)
rows := tk.MustQuery("show variables like '%config%'").Rows()
c.Assert(len(rows), Equals, 1)
configValue := rows[0][1].(string)
globalKillVal := "global-kill"
c.Assert(strings.Contains(configValue, globalKillVal), Equals, false)
}

func (s *testSerialSuite1) TestShowCreateTableWithIntegerDisplayLengthWarnings(c *C) {
parsertypes.TiDBStrictIntegerDisplayWidth = true
defer func() {
Expand Down
1 change: 1 addition & 0 deletions sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ var FeatureSwitchVariables = []string{
TiDBPartitionPruneMode,
TiDBIntPrimaryKeyDefaultAsClustered,
TiDBEnableExtendedStats,
TiDBEnableIndexMergeJoin,
}

// FilterImplicitFeatureSwitch is used to filter result of show variables, these switches should be turn blind to users.
Expand Down