mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #2201 from JohnCailj/dev
improved update statement parser for mysql
This commit is contained in:
@@ -323,6 +323,10 @@ public class MySqlSelectParser extends SQLSelectParser {
|
||||
}
|
||||
}
|
||||
|
||||
while (lexer.token() == Token.HINT) {
|
||||
this.exprParser.parseHints(update.getHints());
|
||||
}
|
||||
|
||||
SQLSelectParser selectParser = this.exprParser.createSelectParser();
|
||||
SQLTableSource updateTableSource = selectParser.parseTableSource();
|
||||
update.setTableSource(updateTableSource);
|
||||
|
||||
@@ -1594,6 +1594,12 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
print0(ucase ? "IGNORE " : "ignore ");
|
||||
}
|
||||
|
||||
|
||||
if (x.getHints() != null && x.getHints().size() > 0) {
|
||||
printAndAccept(x.getHints(), " ");
|
||||
print0(" ");
|
||||
}
|
||||
|
||||
if (x.isCommitOnSuccess()) {
|
||||
print0(ucase ? "COMMIT_ON_SUCCESS " : "commit_on_success ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user