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

optimize:add SQL exception of not supported by AT mode #4336

Merged
merged 10 commits into from
Jan 29, 2022

Conversation

GoodBoyCoder
Copy link
Contributor

@GoodBoyCoder GoodBoyCoder commented Jan 25, 2022

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

添加AT模式不支持的SQL语句异常提示

Ⅱ. Does this pull request fix one issue?

fixes #4324

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2022

Codecov Report

Merging #4336 (f8a4c5a) into develop (ed2917d) will increase coverage by 0.32%.
The diff coverage is 85.71%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4336      +/-   ##
=============================================
+ Coverage      48.43%   48.75%   +0.32%     
- Complexity      3862     3903      +41     
=============================================
  Files            733      733              
  Lines          24766    24829      +63     
  Branches        3002     3057      +55     
=============================================
+ Hits           11995    12106     +111     
+ Misses         11476    11444      -32     
+ Partials        1295     1279      -16     
Impacted Files Coverage Δ
...sqlparser/druid/DruidSQLRecognizerFactoryImpl.java 69.23% <0.00%> (+15.38%) ⬆️
.../java/io/seata/sqlparser/druid/BaseRecognizer.java 89.18% <81.81%> (-3.12%) ⬇️
...a/sqlparser/druid/oracle/BaseOracleRecognizer.java 26.19% <81.81%> (+26.19%) ⬆️
...a/sqlparser/druid/mysql/MySQLDeleteRecognizer.java 61.76% <100.00%> (+1.15%) ⬆️
...a/sqlparser/druid/mysql/MySQLInsertRecognizer.java 57.81% <100.00%> (+0.66%) ⬆️
...er/druid/mysql/MySQLSelectForUpdateRecognizer.java 78.37% <100.00%> (+0.60%) ⬆️
...a/sqlparser/druid/mysql/MySQLUpdateRecognizer.java 68.42% <100.00%> (+0.56%) ⬆️
...sqlparser/druid/oracle/OracleDeleteRecognizer.java 14.28% <100.00%> (+14.28%) ⬆️
...sqlparser/druid/oracle/OracleInsertRecognizer.java 7.69% <100.00%> (+7.69%) ⬆️
.../druid/oracle/OracleSelectForUpdateRecognizer.java 11.42% <100.00%> (+11.42%) ⬆️
... and 59 more

@slievrly slievrly added this to the 1.5.0 milestone Jan 25, 2022
@slievrly slievrly added the mode: AT AT transaction mode label Jan 25, 2022
@lightClouds917
Copy link
Contributor

lightClouds917 commented Jan 25, 2022

https://seata.io/zh-cn/docs/user/sqlreference/sql-restrictions.html 文档里,大佬要不麻烦也给个样例sql。😄

Copy link
Contributor

@funky-eyes funky-eyes left a comment

Choose a reason for hiding this comment

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

LGTM

@lightClouds917
Copy link
Contributor

LGTM

Copy link
Contributor

@lightClouds917 lightClouds917 left a comment

Choose a reason for hiding this comment

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

LGTM

@lightClouds917 lightClouds917 changed the title optimize:add SQL exception prompt not supported by AT mode optimize:add SQL exception of not supported by AT mode Jan 29, 2022
@lightClouds917 lightClouds917 merged commit 76b3e88 into apache:develop Jan 29, 2022
}

@Override
public boolean visit(SQLSubqueryTableSource x) {
Copy link
Member

Choose a reason for hiding this comment

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

for update ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's right. And the example statement is to illustrate the scope of SQLSubqueryTableSource

@GoodBoyCoder GoodBoyCoder deleted the optimize_sql_type branch February 18, 2022 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mode: AT AT transaction mode module/sqlparser sql-parser module type: optimize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AT mode handles unsupported SQL type exceptions
6 participants