-
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
expression, types: Function DAY/DAYOFMONTH the NoZeroDateMode sql mode check when string cast to time #19930
Conversation
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
|
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.
Please add cases in #11178 as a unit test into TiDB. @Patrick0308
@qw4990 OK |
/run-all-tests |
/run-all-tests |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
if res.IsZero() && b.ctx.GetSessionVars().SQLMode.HasNoZeroDateMode() { | ||
return types.ZeroDate, true, handleInvalidTimeError(b.ctx, types.ErrWrongValue.GenWithStackByArgs(types.DateTimeStr, res.String())) | ||
} |
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.
Please add a test case to cover this.
I'm going to close this PR since it hasn't been updated for a long time. feel free to reopen if you want to continue with it. thank you for your contribution. BTW, seems the original issue has been fixed. |
What problem does this PR solve?
Issue Number: a part of #11178
Problem Summary:
What is changed and how it works?
What's Changed: check the NoZeroDateMode sql mode check when string cast to time .
How it Works:
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Release note