-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
stmtctx: remove OverflowAsWarning flag #49122
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,7 +165,6 @@ func initSessCtx( | |
} | ||
sessCtx.GetSessionVars().StmtCtx.SetTimeZone(sessCtx.GetSessionVars().Location()) | ||
sessCtx.GetSessionVars().StmtCtx.BadNullAsWarning = !sqlMode.HasStrictMode() | ||
sessCtx.GetSessionVars().StmtCtx.OverflowAsWarning = !sqlMode.HasStrictMode() | ||
sessCtx.GetSessionVars().StmtCtx.DividedByZeroAsWarning = !sqlMode.HasStrictMode() | ||
|
||
typeFlags := types.StrictFlags. | ||
|
@@ -196,7 +195,6 @@ func restoreSessCtx(sessCtx sessionctx.Context) func(sessCtx sessionctx.Context) | |
timezone = &tz | ||
} | ||
badNullAsWarn := sv.StmtCtx.BadNullAsWarning | ||
overflowAsWarn := sv.StmtCtx.OverflowAsWarning | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
dividedZeroAsWarn := sv.StmtCtx.DividedByZeroAsWarning | ||
typeFlags := sv.StmtCtx.TypeFlags() | ||
resGroupName := sv.ResourceGroupName | ||
|
@@ -206,7 +204,6 @@ func restoreSessCtx(sessCtx sessionctx.Context) func(sessCtx sessionctx.Context) | |
uv.SQLMode = sqlMode | ||
uv.TimeZone = timezone | ||
uv.StmtCtx.BadNullAsWarning = badNullAsWarn | ||
uv.StmtCtx.OverflowAsWarning = overflowAsWarn | ||
uv.StmtCtx.DividedByZeroAsWarning = dividedZeroAsWarn | ||
uv.StmtCtx.SetTypeFlags(typeFlags) | ||
uv.ResourceGroupName = resGroupName | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is introduced in #47842. I think it's a bug, right? @lcwangchao Please confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a mistake, but introduced in previous PR: #47543 . In #47543 it overrides the type context settings before it...