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

Fix Format syntax err message when value out of range #1225

Closed
wants to merge 3 commits into from
Closed

Fix Format syntax err message when value out of range #1225

wants to merge 3 commits into from

Conversation

chenquan
Copy link

What problem does this PR solve?

related PR: pingcap/tidb#17489 pingcap/tidb#17745

What is changed and how it works?

Ignore error that the decimal out of range the value

Check List

Tests

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

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

@CLAassistant
Copy link

CLAassistant commented May 16, 2021

CLA assistant check
All committers have signed the CLA.

@chenquan
Copy link
Author

chenquan commented May 17, 2021

Why are all integration tests timeout?
https://app.circleci.com/pipelines/github/pingcap/parser
image

@chenquan
Copy link
Author

PTAL @tangenta @kennytm @JmPotato

@@ -158,7 +158,24 @@ func (parser *Parser) Parse(sql, charset, collation string) (stmt []ast.StmtNode
warns = nil
}
if len(errs) != 0 {
return nil, warns, errors.Trace(errs[0])
err := errs[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It changes the logistic, can you please explain why do not return the error in some situations?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's not the best solution, I'll close it.

@xiongjiwei
Copy link
Contributor

BTW, can you please add some tests for it?

@chenquan chenquan closed this May 19, 2021
@chenquan chenquan deleted the fix/parse branch May 19, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants