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

SQLASTOutputVisitor存在bug #1931

Closed
hupengjie opened this issue Aug 26, 2017 · 3 comments
Closed

SQLASTOutputVisitor存在bug #1931

hupengjie opened this issue Aug 26, 2017 · 3 comments
Labels
Milestone

Comments

@hupengjie
Copy link

public boolean visit(MergeInsertClause x) {
    print0(ucase ? "WHEN NOT MATCHED THEN INSERT" : "when not matched then insert");
    if (x.getColumns().size() > 0) {
        print(' ');
        printAndAccept(x.getColumns(), ", ");
    }
    print0(ucase ? " VALUES (" : " values (");

这里的insert后面的属性没有用小括号括起来。

@wenshao wenshao added this to the 1.1.4 milestone Sep 4, 2017
@wenshao wenshao added the Bug label Sep 4, 2017
@wenshao
Copy link
Member

wenshao commented Sep 4, 2017

能提供验证SQL么?

@hupengjie
Copy link
Author

@wenshao
MERGE INTO tb_xxx_test t1
USING (SELECT '1' AS aa_item_id, '2' AS mem_test_id FROM dual) t2
ON (t1.aa_item_id = t2.aa_item_id AND t1.mem_test_id = t2.mem_test_id)
WHEN NOT MATCHED THEN
INSERT aa_id, aa_item_id, gg_id, test_id
VALUES
(?,
?,
?,
?)

@wenshao
Copy link
Member

wenshao commented Oct 3, 2017

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

@wenshao wenshao closed this as completed Oct 3, 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