-
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
ddl: fix cast date as timestamp will write invalid value #26362
ddl: fix cast date as timestamp will write invalid value #26362
Conversation
Signed-off-by: ailinkid <314806019@qq.com>
switch job.SchemaState { | ||
case model.StateWriteOnly: | ||
_, checkErr1 = internalTK.Exec("insert into `t` set `a` = '3977-02-22'") // this(string) will be cast to a as date, then cast a(date) as timestamp to changing column. | ||
_, checkErr2 = internalTK.Exec("update t set `a` = '3977-02-22'") |
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.
Do we need to add a delete
statement 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.
only WRITE will cause failure
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
Signed-off-by: ailinkid <314806019@qq.com>
/run-all-tests |
Signed-off-by: ailinkid <314806019@qq.com>
I'v made the test locally. |
/build |
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
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/run-check_dev_2 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 111eefd
|
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-5.1 in PR #26395 |
Signed-off-by: ailinkid 314806019@qq.com
What problem does this PR solve?
Issue Number: close #26292
What is changed and how it works?
What's Changed:
Reorg Process include 2 stage:
1: cast the relative column to changing column at write stage.
2: cast the old record to new record at the background reorg stage.
Reorg process have a special control of cast function.
Check List
Tests
Side effects
Documentation
Release note