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

bugfix: support where condition exists for Oracle #1914

Merged
merged 16 commits into from
Nov 20, 2019
Merged

bugfix: support where condition exists for Oracle #1914

merged 16 commits into from
Nov 20, 2019

Conversation

yuhuangbin
Copy link
Contributor

Ⅰ. Describe what this PR did

support where condition exists for Oracle

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Nov 19, 2019

Codecov Report

Merging #1914 into develop will decrease coverage by 0.02%.
The diff coverage is 88.88%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop   #1914      +/-   ##
============================================
- Coverage      55.33%   55.3%   -0.03%     
+ Complexity      2405    2402       -3     
============================================
  Files            428     428              
  Lines          14361   14347      -14     
  Branches        1694    1688       -6     
============================================
- Hits            7947    7935      -12     
  Misses          5697    5697              
+ Partials         717     715       -2
Impacted Files Coverage Δ Complexity Δ
...a/rm/datasource/sql/druid/BaseMySQLRecognizer.java 90.9% <100%> (+3.4%) 6 <0> (-4) ⬇️
...asource/sql/druid/oracle/BaseOracleRecognizer.java 90.9% <100%> (-3.54%) 6 <4> (-6)
.../seata/rm/datasource/sql/druid/BaseRecognizer.java 87.5% <80%> (-12.5%) 6 <4> (+4)
...o/seata/server/coordinator/DefaultCoordinator.java 48.41% <0%> (+0.39%) 29% <0%> (+2%) ⬆️
...in/java/io/seata/server/session/GlobalSession.java 85.02% <0%> (+0.48%) 68% <0%> (+1%) ⬆️

@@ -50,6 +57,20 @@ public BaseRecognizer(String originalSQL) {

}

public void excuteVisit(SQLExpr where, SQLASTVisitor visitor) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change the name to executeVisit()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

LGTM. Test passed.
Test Case

update account_tbl a set money = money - ?
where exists ( select 1 from order_tbl o where a.user_id = o.user_id and o.user = ?)

update account_tbl a set money = money - ?
where not exists ( select 1 from order_tbl o where a.user_id = o.user_id and o.user = ?)

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly merged commit 900e876 into apache:develop Nov 20, 2019
@slievrly slievrly added this to the 1.0 milestone Dec 2, 2019
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.

None yet

6 participants