Merge pull request #2201 from JohnCailj/dev

improved update statement parser for mysql
This commit is contained in:
温绍
2017-12-18 17:56:44 +08:00
committed by GitHub
8 changed files with 89 additions and 7 deletions
@@ -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 ");
}