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: fix get tablename and alias error in mysql delete #2628

Merged
merged 3 commits into from
May 3, 2020
Merged

bugfix: fix get tablename and alias error in mysql delete #2628

merged 3 commits into from
May 3, 2020

Conversation

jsbxyyx
Copy link
Member

@jsbxyyx jsbxyyx commented Apr 28, 2020

Ⅰ. Describe what this PR did

fix mysql delete with alias error.

Ⅱ. Does this pull request fix one issue?

fixes: #2626

Ⅲ. 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 Apr 28, 2020

Codecov Report

Merging #2628 into develop will decrease coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2628      +/-   ##
=============================================
- Coverage      51.24%   51.24%   -0.01%     
- Complexity      2817     2819       +2     
=============================================
  Files            556      556              
  Lines          17803    17807       +4     
  Branches        2101     2102       +1     
=============================================
+ Hits            9123     9125       +2     
- Misses          7818     7820       +2     
  Partials         862      862              
Impacted Files Coverage Δ Complexity Δ
...a/sqlparser/druid/mysql/MySQLDeleteRecognizer.java 78.94% <33.33%> (-21.06%) 6.00 <1.00> (ø)
...in/java/io/seata/server/session/GlobalSession.java 84.16% <0.00%> (+0.45%) 72.00% <0.00%> (+1.00%)
...o/seata/server/coordinator/DefaultCoordinator.java 55.15% <0.00%> (+0.51%) 29.00% <0.00%> (+1.00%)

Copy link
Contributor

@zjinlei zjinlei left a comment

Choose a reason for hiding this comment

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

LGTM
Compared com.alibaba.druid.sql.parser.SQLStatementParser
parseUpdateStatement()
parseDeleteStatement()

@zjinlei zjinlei changed the title bugfix: mysql delete alias error bugfix: mysql delete tablename and alias error May 1, 2020
@zjinlei zjinlei changed the title bugfix: mysql delete tablename and alias error bugfix: fix mysql delete tablename and alias error May 1, 2020
@zjinlei zjinlei added this to the 1.3.0 milestone May 1, 2020
Copy link
Member

@xingfudeshi xingfudeshi left a comment

Choose a reason for hiding this comment

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

LGTM.

@zjinlei zjinlei changed the title bugfix: fix mysql delete tablename and alias error bugfix: fix get tablename and alias error in mysql delete May 3, 2020
@zjinlei zjinlei merged commit fedc085 into apache:develop May 3, 2020
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.

在使用delete语句时,如果表名后跟了别名会报找不到表名
4 participants