Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: gengliqi <gengliqiii@gmail.com>
  • Loading branch information
gengliqi authored and ti-chi-bot committed Apr 23, 2023
1 parent 1044515 commit 1b7dbd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sessionctx/variable/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ func NewSessionVars(hctx HookContext) *SessionVars {
Enable3StageDistinctAgg: DefTiDB3StageDistinctAgg,
MaxAllowedPacket: DefMaxAllowedPacket,
TiFlashFastScan: DefTiFlashFastScan,
EnableTiFlashReadForWriteStmt: DefTiDBEnableTiFlashReadForWriteStmt,
EnableTiFlashReadForWriteStmt: true,
ForeignKeyChecks: DefTiDBForeignKeyChecks,
HookContext: hctx,
EnableReuseCheck: DefTiDBEnableReusechunk,
Expand Down
8 changes: 4 additions & 4 deletions sessionctx/variable/sysvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -2007,15 +2007,15 @@ var defaultSysVars = []*SysVar{
s.MultiStatementMode = TiDBOptOnOffWarn(val)
return nil
}},
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableExchangePartition, Value: BoolToOnOff(DefTiDBEnableExchangePartition), Type: TypeBool,
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableExchangePartition, Value: On, Type: TypeBool,
Validation: func(vars *SessionVars, s string, s2 string, flag ScopeFlag) (string, error) {
if s == Off {
vars.StmtCtx.AppendWarning(errors.New("tidb_enable_exchange_partition is always turned on. This variable has been deprecated and will be removed in the future releases"))
}
return On, nil
},
SetSession: func(s *SessionVars, val string) error {
s.TiDBEnableExchangePartition = DefTiDBEnableExchangePartition
s.TiDBEnableExchangePartition = true
return nil
}},
// It's different from tmp_table_size or max_heap_table_size. See https://github.com/pingcap/tidb/issues/28691.
Expand Down Expand Up @@ -2209,15 +2209,15 @@ var defaultSysVars = []*SysVar{
}
return nil
}},
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableTiFlashReadForWriteStmt, Value: BoolToOnOff(DefTiDBEnableTiFlashReadForWriteStmt), Type: TypeBool,
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableTiFlashReadForWriteStmt, Value: On, Type: TypeBool,
Validation: func(vars *SessionVars, s string, s2 string, flag ScopeFlag) (string, error) {
if s == Off {
vars.StmtCtx.AppendWarning(errors.New("tidb_enable_tiflash_read_for_write_stmt is always turned on. This variable has been deprecated and will be removed in the future releases"))
}
return On, nil
},
SetSession: func(s *SessionVars, val string) error {
s.EnableTiFlashReadForWriteStmt = DefTiDBEnableTiFlashReadForWriteStmt
s.EnableTiFlashReadForWriteStmt = true
return nil
}},
{Scope: ScopeGlobal | ScopeSession, Name: TiDBEnableUnsafeSubstitute, Value: BoolToOnOff(false), Type: TypeBool, SetSession: func(s *SessionVars, val string) error {
Expand Down
2 changes: 0 additions & 2 deletions sessionctx/variable/tidb_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,6 @@ const (
DefTiDBAutoAnalyzePartitionBatchSize = 1
DefTiDBEnableIndexMergeJoin = false
DefTiDBTrackAggregateMemoryUsage = true
DefTiDBEnableExchangePartition = true
DefCTEMaxRecursionDepth = 1000
DefTiDBTmpTableMaxSize = 64 << 20 // 64MB.
DefTiDBEnableLocalTxn = false
Expand Down Expand Up @@ -1209,7 +1208,6 @@ const (
DefTiDBEnableNonPreparedPlanCacheForDML = false
DefTiDBNonPreparedPlanCacheSize = 100
DefTiDBPlanCacheMaxPlanSize = 2 * size.MB
DefTiDBEnableTiFlashReadForWriteStmt = true
// MaxDDLReorgBatchSize is exported for testing.
MaxDDLReorgBatchSize int32 = 10240
MinDDLReorgBatchSize int32 = 32
Expand Down

0 comments on commit 1b7dbd1

Please sign in to comment.