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(sql-check): avoid reporting syntax error when sql is executed successfully #748

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

yhilmare
Copy link
Contributor

@yhilmare yhilmare commented Nov 9, 2023

What type of PR is this?

type-bug

What this PR does / why we need it:

out parser can not behaves same with the observer's parser completely so that a sql may be executed completely but get a syntax error from sql-check in odc which will confuse user.

this pr fix this issue.

I have tested 2.2.77, 3.2.4 and 4.2.1 for both MySQL and Oracle mode and I asked kernel R&D classmates for help, and what I can confirm is that

mysql324: ErrorCode = 1064, SQLState = 42000
mysql2277: ErrorCode = 1064, SQLState = 42000 
mysql421: ErrorCode = 1064, SQLState = 42000
mysql57: ErrorCode = 1064, SQLState = 42000
oracle2277: ErrorCode = 900, SQLState = 42000
oracle324: ErrorCode = 900, SQLState = 42000 
oracle421: ErrorCode = 900, SQLState = 42000

Which issue(s) this PR fixes:

Fixes #746

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@yhilmare yhilmare added the type-bug Something isn't working label Nov 9, 2023
@yhilmare yhilmare added this to the ODC 4.2.2-bp milestone Nov 9, 2023
@yhilmare yhilmare self-assigned this Nov 9, 2023
Copy link
Contributor

@yizhouxw yizhouxw left a comment

Choose a reason for hiding this comment

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

lgtm

@yhilmare yhilmare merged commit fe9fbfc into dev/4.2.2 Nov 9, 2023
11 checks passed
@yhilmare yhilmare deleted the fix/shanlu_sql_check branch November 9, 2023 07:48
yhilmare added a commit that referenced this pull request Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants