-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
stmtctx: remove OverflowAsWarning flag #49122
Conversation
Skipping CI for Draft Pull Request. |
/retest |
Skipping CI for Draft Pull Request. |
f734a78
to
95fd483
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #49122 +/- ##
================================================
+ Coverage 70.9870% 71.5603% +0.5732%
================================================
Files 1368 1417 +49
Lines 399790 417923 +18133
================================================
+ Hits 283799 299067 +15268
- Misses 96179 100033 +3854
+ Partials 19812 18823 -989
Flags with carried forward coverage won't be shown. Click here to find out more.
|
95fd483
to
b8ee154
Compare
51a3bbb
to
c5856a5
Compare
@@ -315,7 +313,6 @@ func NewSession(options *encode.SessionOptions, logger log.Logger) *Session { | |||
} | |||
} | |||
vars.StmtCtx.SetTimeZone(vars.Location()) | |||
vars.StmtCtx.SetTypeFlags(types.StrictFlags) |
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.
c5856a5
to
581271b
Compare
/retest |
/test unit-test |
@wuhuizuo: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
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.
/approve
for lightning part I'll check the integration test results
/test pull-lightning-integration-test |
@lance6716: The specified target(s) for
Use In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Here we remove OverflowAsWarning
, do we need to add WithTruncateAsWarning
?
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.
WithTruncateAsWarning
is part of typeFlags
. Here we restored the typeFlags
, so it's fine to just remove OverflowAsWarning
.
/retest |
/cc @SeaRise |
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
581271b
to
8da014e
Compare
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.
lgtm
[LGTM Timeline notifier]Timeline:
|
@YangKeao: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lance6716, SeaRise, tiancaiamao, windtalker, zimulala The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What problem does this PR solve?
Issue Number: close #49143, close #49137
Problem Summary:
The difference between
OverflowAsWarning
andTruncatedAsWarning
doesn't actually exist. The existing difference are all incompatible with MySQL.I suggest to read #49141 (comment). It gives a clearer explanation on why this PR is right.
What changed and how does it work?
This PR removes
OverflowAsWarning
and handle them throughHandleError
. ActuallyHandleError
andHandleTruncate
are the same (andHandleTruncate
will be removed in this or next week). As we providedHandleErrorWithAlias
, it's more appropriate for this PR.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.