ddl: initialize the mock session in advanced (#41227)
close pingcap/tidb#40879
This commit is contained in:
@ -861,6 +861,9 @@ func initSessCtx(sessCtx sessionctx.Context, sqlMode mysql.SQLMode, tzLocation *
|
||||
sessCtx.GetSessionVars().StmtCtx.DividedByZeroAsWarning = !sqlMode.HasStrictMode()
|
||||
sessCtx.GetSessionVars().StmtCtx.IgnoreZeroInDate = !sqlMode.HasStrictMode() || sqlMode.HasAllowInvalidDatesMode()
|
||||
sessCtx.GetSessionVars().StmtCtx.NoZeroDate = sqlMode.HasStrictMode()
|
||||
// Prevent initializing the mock context in the workers concurrently.
|
||||
// For details, see https://github.com/pingcap/tidb/issues/40879.
|
||||
_ = sessCtx.GetDomainInfoSchema()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user