diff --git a/session/session.go b/session/session.go index d1666be45063f..76fac6d932b61 100644 --- a/session/session.go +++ b/session/session.go @@ -2506,6 +2506,7 @@ var builtinGlobalVariable = []string{ variable.TiDBOptBCJ, variable.TiDBBCJThresholdSize, variable.TiDBBCJThresholdCount, + variable.TiDBOptCartesianBCJ, variable.TiDBRowFormatVersion, variable.TiDBEnableStmtSummary, variable.TiDBStmtSummaryInternalQuery, diff --git a/sessionctx/variable/session.go b/sessionctx/variable/session.go index 591ae934ba3dc..137a50891981d 100644 --- a/sessionctx/variable/session.go +++ b/sessionctx/variable/session.go @@ -1449,6 +1449,8 @@ func (s *SessionVars) SetSystemVar(name string, val string) error { s.BroadcastJoinThresholdSize = tidbOptInt64(val, DefBroadcastJoinThresholdSize) case TiDBBCJThresholdCount: s.BroadcastJoinThresholdCount = tidbOptInt64(val, DefBroadcastJoinThresholdCount) + case TiDBOptCartesianBCJ: + s.AllowCartesianBCJ = int(tidbOptInt64(val, DefOptCartesianBCJ)) case TiDBOptDistinctAggPushDown: s.AllowDistinctAggPushDown = TiDBOptOn(val) case TiDBOptWriteRowID: