Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Druid解析子查询sql的查询条件的bug #1798

Closed
stevenczp opened this issue Jun 28, 2017 · 1 comment
Closed

Druid解析子查询sql的查询条件的bug #1798

stevenczp opened this issue Jun 28, 2017 · 1 comment
Labels
Milestone

Comments

@stevenczp
Copy link

stevenczp commented Jun 28, 2017

测试代码

    String sql = "select * from t1 where b in (select b from t2) and a = 1";
    MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
    MySqlStatementParser parser = new MySqlStatementParser(sql);
    SQLStatement statement = parser.parseStatement();
    statement.accept(visitor);
    System.out.println(visitor.getConditions());

打印出来的查询条件是:
[t1.b IN, t2.a = 1]

但是正常来说,第二个查询条件应该是t1.a = 1才对

问题版本号:1.0.31

@wenshao wenshao added the Bug label Jun 29, 2017
@wenshao wenshao added this to the 1.1.11 milestone Jul 12, 2017
@wenshao
Copy link
Member

wenshao commented Jul 13, 2017

https://github.com/alibaba/druid/releases/tag/1.1.1
问题已经修复,请使用新版本

@wenshao wenshao closed this as completed Jul 13, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants