Skip to content

Commit

Permalink
variable: remove radix join variable (#24566)
Browse files Browse the repository at this point in the history
  • Loading branch information
rleungx committed May 24, 2021
1 parent 26cf50e commit b7c93e8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"sync/atomic"
"time"

"github.com/klauspost/cpuid"
"github.com/pingcap/parser"
"github.com/pingcap/parser/ast"
"github.com/pingcap/parser/auth"
Expand Down Expand Up @@ -632,13 +631,6 @@ type SessionVars struct {

writeStmtBufs WriteStmtBufs

// L2CacheSize indicates the size of CPU L2 cache, using byte as unit.
L2CacheSize int

// EnableRadixJoin indicates whether to use radix hash join to execute
// HashJoin.
EnableRadixJoin bool

// ConstraintCheckInPlace indicates whether to check the constraint when the SQL executing.
ConstraintCheckInPlace bool

Expand Down Expand Up @@ -1019,9 +1011,7 @@ func NewSessionVars() *SessionVars {
MemoryFactor: DefOptMemoryFactor,
DiskFactor: DefOptDiskFactor,
ConcurrencyFactor: DefOptConcurrencyFactor,
EnableRadixJoin: false,
EnableVectorizedExpression: DefEnableVectorizedExpression,
L2CacheSize: cpuid.CPU.Cache.L2,
CommandValue: uint32(mysql.ComSleep),
TiDBOptJoinReorderThreshold: DefTiDBOptJoinReorderThreshold,
SlowQueryFile: config.GetGlobalConfig().Log.SlowQueryFile,
Expand Down
4 changes: 0 additions & 4 deletions sessionctx/variable/sysvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -1244,10 +1244,6 @@ var defaultSysVars = []*SysVar{
atomic.StoreInt32(&ForcePriority, int32(mysql.Str2Priority(val)))
return nil
}},
{Scope: ScopeSession, Name: TiDBEnableRadixJoin, Value: BoolToOnOff(DefTiDBUseRadixJoin), Type: TypeBool, skipInit: true, SetSession: func(s *SessionVars, val string) error {
s.EnableRadixJoin = TiDBOptOn(val)
return nil
}},
{Scope: ScopeGlobal | ScopeSession, Name: TiDBOptJoinReorderThreshold, Value: strconv.Itoa(DefTiDBOptJoinReorderThreshold), skipInit: true, Type: TypeUnsigned, MinValue: 0, MaxValue: 63, SetSession: func(s *SessionVars, val string) error {
s.TiDBOptJoinReorderThreshold = tidbOptPositiveInt32(val, DefTiDBOptJoinReorderThreshold)
return nil
Expand Down
5 changes: 0 additions & 5 deletions sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,6 @@ const (
// It can be "NO_PRIORITY", "LOW_PRIORITY", "HIGH_PRIORITY", "DELAYED"
TiDBForcePriority = "tidb_force_priority"

// tidb_enable_radix_join indicates to use radix hash join algorithm to execute
// HashJoin.
TiDBEnableRadixJoin = "tidb_enable_radix_join"

// tidb_constraint_check_in_place indicates to check the constraint when the SQL executing.
// It could hurt the performance of bulking insert when it is ON.
TiDBConstraintCheckInPlace = "tidb_constraint_check_in_place"
Expand Down Expand Up @@ -632,7 +628,6 @@ const (
DefTiDBMergeJoinConcurrency = 1 // disable optimization by default
DefTiDBStreamAggConcurrency = 1
DefTiDBForcePriority = mysql.NoPriority
DefTiDBUseRadixJoin = false
DefEnableWindowFunction = true
DefEnableStrictDoubleTypeCheck = true
DefEnableVectorizedExpression = true
Expand Down
1 change: 0 additions & 1 deletion sessionctx/variable/varsutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func (s *testVarsutilSuite) TestNewSessionVars(c *C) {
c.Assert(vars.MemQuotaIndexLookupReader, Equals, int64(DefTiDBMemQuotaIndexLookupReader))
c.Assert(vars.MemQuotaIndexLookupJoin, Equals, int64(DefTiDBMemQuotaIndexLookupJoin))
c.Assert(vars.MemQuotaApplyCache, Equals, int64(DefTiDBMemQuotaApplyCache))
c.Assert(vars.EnableRadixJoin, Equals, DefTiDBUseRadixJoin)
c.Assert(vars.AllowWriteRowID, Equals, DefOptWriteRowID)
c.Assert(vars.TiDBOptJoinReorderThreshold, Equals, DefTiDBOptJoinReorderThreshold)
c.Assert(vars.EnableFastAnalyze, Equals, DefTiDBUseFastAnalyze)
Expand Down

0 comments on commit b7c93e8

Please sign in to comment.