mysql parser bug fixed

This commit is contained in:
温少
2012-05-17 08:39:07 +08:00
parent de1d141e4b
commit 8e9e94e754
10 changed files with 307 additions and 72 deletions
@@ -168,6 +168,18 @@ public class SQLStatementParser extends SQLParser {
if (parseStatementListDialect(statementList)) {
continue;
}
if (lexer.token() == Token.LPAREN) {
char mark_ch = lexer.current();
int mark_bp = lexer.bp();
lexer.nextToken();
if (lexer.token() == Token.SELECT) {
lexer.reset(mark_bp, mark_ch, Token.LPAREN);
SQLStatement stmt = parseSelect();
statementList.add(stmt);
continue;
}
}
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
}