-
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
executor: make the inserting errors more easier to understand (#24044) #26324
base: master
Are you sure you want to change the base?
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
/cc @mmyj @wjhuang2016 thanks |
@zoomxi: GitHub didn't allow me to request PR reviews from the following users: thanks, mmyj. Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
tk.MustExec("insert into t1 values(2,\"b\")") | ||
|
||
err := tk.ExecToErr("insert into t1 select * from t1 on duplicate key update id = \"\"") | ||
c.Assert(err.Error(), Equals, "[table:1366]Incorrect int value: '' for column 'id' at row 1") |
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.
Could you check that the row index is correct? For example, when the incorrect row is the second row?
/cc @mmyj |
@Mini256: GitHub didn't allow me to request PR reviews from the following users: mmyj. Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
It's OK for me, but I'm not familiar with this module.😅 |
@zoomxi: PR needs rebase. 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. |
What problem does this PR solve?
Issue Number: close #24044
Problem Summary: The error messages when inserting are not easy to understand
What is changed and how it works?
What's Changed: changed doDupRowUpdate function in insert.go
How it Works: convert the err message in doDupRowUpdate when get column value
Check List
Tests
Release note
No release note