Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zoomxi
Copy link
Contributor

@zoomxi zoomxi commented Jul 19, 2021

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

  • Unit test
  • Manual test (add detailed scripts or steps below)

Release note

  • No release note

@ti-chi-bot
Copy link
Member

[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 /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 19, 2021
@github-actions github-actions bot added the sig/execution SIG execution label Jul 19, 2021
@zoomxi
Copy link
Contributor Author

zoomxi commented Jul 19, 2021

/cc @mmyj @wjhuang2016 thanks

@ti-chi-bot
Copy link
Member

@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:

/cc @mmyj @wjhuang2016 thanks

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")
Copy link
Member

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?

@Mini256
Copy link
Member

Mini256 commented Jul 19, 2021

/cc @mmyj

@ti-chi-bot
Copy link
Member

@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:

/cc @mmyj

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.

@ichn-hu ichn-hu mentioned this pull request Jul 19, 2021
@mmyj
Copy link
Member

mmyj commented Jul 20, 2021

It's OK for me, but I'm not familiar with this module.😅

@ti-chi-bot
Copy link
Member

@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.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/execution SIG execution size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The error messages when inserting errors are not easy to understand
5 participants