mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
+3
-3
@@ -503,7 +503,7 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
|
||||
partitionClauseRest(clause);
|
||||
} else {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
@@ -532,7 +532,7 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.ON)) {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.AS)) {
|
||||
@@ -839,6 +839,6 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
return (SQLTableConstraint) fk;
|
||||
}
|
||||
|
||||
throw new ParserException("TODO :" + lexer.token());
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
case VALUES:
|
||||
lexer.nextToken();
|
||||
if (lexer.token() != Token.LPAREN) {
|
||||
throw new ParserException("syntax error, illegal values clause");
|
||||
throw new ParserException("syntax error, illegal values clause. " + lexer.info());
|
||||
}
|
||||
return this.methodRest(new SQLIdentifierExpr("VALUES"), true);
|
||||
case BINARY:
|
||||
@@ -234,7 +234,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
if ("USING".equalsIgnoreCase(lexer.stringVal())) {
|
||||
lexer.nextToken();
|
||||
if (lexer.token() != Token.IDENTIFIER) {
|
||||
throw new ParserException("syntax error, illegal hex");
|
||||
throw new ParserException("syntax error, illegal hex. " + lexer.info());
|
||||
}
|
||||
String charSet = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
@@ -250,7 +250,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
}
|
||||
|
||||
if (lexer.token() != Token.IDENTIFIER) {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
String collate = lexer.stringVal();
|
||||
@@ -267,7 +267,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
lexer.nextToken();
|
||||
|
||||
if (lexer.token() != Token.IDENTIFIER) {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
String collate = lexer.stringVal();
|
||||
@@ -297,7 +297,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
lexer.nextToken();
|
||||
|
||||
if (lexer.token() != Token.IDENTIFIER) {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
String unitVal = lexer.stringVal();
|
||||
@@ -340,7 +340,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
} else if (lexer.token() == Token.RPAREN) {
|
||||
break;
|
||||
} else {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -415,10 +415,10 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
acceptIdentifier("MODE");
|
||||
matchAgainstExpr.setSearchModifier(SearchModifier.IN_BOOLEAN_MODE);
|
||||
} else {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
} else if (lexer.token() == Token.WITH) {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
accept(Token.RPAREN);
|
||||
@@ -437,7 +437,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
if (identifierEquals("USING")) {
|
||||
lexer.nextToken();
|
||||
if (lexer.token() != Token.IDENTIFIER) {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
String charset = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
@@ -484,8 +484,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.ERROR) {
|
||||
throw new ParserException("syntax error, token: " + lexer.token() + " " + lexer.stringVal() + ", pos : "
|
||||
+ lexer.pos());
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
return super.primaryRest(expr);
|
||||
@@ -527,7 +526,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
SQLExpr value = expr();
|
||||
|
||||
if (lexer.token() != Token.IDENTIFIER) {
|
||||
throw new ParserException("Syntax error");
|
||||
throw new ParserException("Syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
String unit = lexer.stringVal();
|
||||
@@ -580,7 +579,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.PARTITION) {
|
||||
throw new ParserException("syntax error " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("syntax error " + lexer.info());
|
||||
}
|
||||
|
||||
if (identifierEquals("STORAGE")) {
|
||||
@@ -900,7 +899,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
fk.setOnUpdate(option);
|
||||
} else {
|
||||
throw new ParserException("syntax error, expect DELETE or UPDATE, actual " + lexer.token() + " "
|
||||
+ lexer.stringVal());
|
||||
+ lexer.info());
|
||||
}
|
||||
}
|
||||
return fk;
|
||||
@@ -925,11 +924,11 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("syntax error, expect ACTION, actual " + lexer.token() + " "
|
||||
+ lexer.stringVal());
|
||||
+ lexer.info());
|
||||
}
|
||||
} else {
|
||||
throw new ParserException("syntax error, expect ACTION, actual " + lexer.token() + " "
|
||||
+ lexer.stringVal());
|
||||
+ lexer.info());
|
||||
}
|
||||
|
||||
return option;
|
||||
|
||||
@@ -83,7 +83,7 @@ public class MySqlLexer extends Lexer {
|
||||
|
||||
public void scanSharp() {
|
||||
if (ch != '#') {
|
||||
throw new ParserException("illegal stat");
|
||||
throw new ParserException("illegal stat. " + info());
|
||||
}
|
||||
|
||||
if (charAt(pos + 1) == '{') {
|
||||
@@ -139,7 +139,7 @@ public class MySqlLexer extends Lexer {
|
||||
|
||||
public void scanVariable() {
|
||||
if (ch != '@' && ch != ':' && ch != '#' && ch != '$') {
|
||||
throw new ParserException("illegal variable");
|
||||
throw new ParserException("illegal variable. " + info());
|
||||
}
|
||||
|
||||
mark = pos;
|
||||
@@ -162,7 +162,7 @@ public class MySqlLexer extends Lexer {
|
||||
ch = charAt(++pos);
|
||||
break;
|
||||
} else if (ch == EOI) {
|
||||
throw new ParserException("illegal identifier");
|
||||
throw new ParserException("illegal identifier. " + info());
|
||||
}
|
||||
|
||||
bufPos++;
|
||||
@@ -185,7 +185,7 @@ public class MySqlLexer extends Lexer {
|
||||
ch = charAt(++pos);
|
||||
break;
|
||||
} else if (ch == EOI) {
|
||||
throw new ParserException("illegal identifier");
|
||||
throw new ParserException("illegal identifier. " + info());
|
||||
}
|
||||
|
||||
bufPos++;
|
||||
@@ -231,7 +231,7 @@ public class MySqlLexer extends Lexer {
|
||||
ch = charAt(++pos);
|
||||
break;
|
||||
} else if (ch == EOI) {
|
||||
throw new ParserException("illegal identifier");
|
||||
throw new ParserException("illegal identifier. " + info());
|
||||
}
|
||||
|
||||
bufPos++;
|
||||
@@ -251,7 +251,7 @@ public class MySqlLexer extends Lexer {
|
||||
|
||||
final boolean firstFlag = isFirstIdentifierChar(first);
|
||||
if (!firstFlag) {
|
||||
throw new ParserException("illegal identifier");
|
||||
throw new ParserException("illegal identifier. " + info());
|
||||
}
|
||||
|
||||
mark = pos;
|
||||
|
||||
@@ -160,7 +160,7 @@ public class MySqlSelectIntoParser extends SQLSelectParser {
|
||||
|
||||
if (lexer.token() == Token.PROCEDURE) {
|
||||
lexer.nextToken();
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
parseInto(queryBlock);
|
||||
|
||||
@@ -175,7 +175,7 @@ public class MySqlSelectParser extends SQLSelectParser {
|
||||
|
||||
if (lexer.token() == Token.PROCEDURE) {
|
||||
lexer.nextToken();
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
parseInto(queryBlock);
|
||||
@@ -240,7 +240,7 @@ public class MySqlSelectParser extends SQLSelectParser {
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.SELECT) {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
SQLExprTableSource tableReference = new SQLExprTableSource();
|
||||
|
||||
+37
-37
@@ -250,7 +250,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
lexer.nextToken();
|
||||
deleteStatement.setTableSource(createSQLSelectParser().parseTableSource());
|
||||
} else {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
if (identifierEquals("USING")) {
|
||||
@@ -422,7 +422,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
stmt.setUsing("HASH");
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -487,7 +487,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
} else if (lexer.token() == Token.LITERAL_INT) {
|
||||
// skip
|
||||
} else {
|
||||
throw new ParserException("not support kill type " + lexer.token());
|
||||
throw new ParserException("not support kill type " + lexer.token() + ". " + lexer.info());
|
||||
}
|
||||
|
||||
this.exprParser.exprList(stmt.getThreadIds(), stmt);
|
||||
@@ -657,7 +657,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
setErrorEndPos(lexer.pos());
|
||||
throw new ParserException("syntax error, expect TABLES or TABLE, actual " + lexer.token());
|
||||
throw new ParserException("syntax error, expect TABLES or TABLE, actual " + lexer.token() + ", " + lexer.info());
|
||||
}
|
||||
|
||||
MySqlLockTableStatement stmt = new MySqlLockTableStatement();
|
||||
@@ -678,7 +678,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
acceptIdentifier(WRITE);
|
||||
stmt.setLockType(LockType.LOW_PRIORITY_WRITE);
|
||||
} else {
|
||||
throw new ParserException("syntax error, expect READ or WRITE, actual " + lexer.token());
|
||||
throw new ParserException("syntax error, expect READ or WRITE, actual " + lexer.token() + ", " + lexer.info());
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.HINT) {
|
||||
@@ -698,7 +698,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
setErrorEndPos(lexer.pos());
|
||||
throw new ParserException("syntax error, expect TABLES or TABLE, actual " + lexer.token());
|
||||
throw new ParserException("syntax error, expect TABLES or TABLE, actual " + lexer.token() + ", " + lexer.info());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -784,7 +784,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
lexer.nextToken();
|
||||
describe.setDescribe(true);
|
||||
} else {
|
||||
throw new ParserException("expect one of {DESCRIBE | DESC} , actual " + lexer.token());
|
||||
throw new ParserException("expect one of {DESCRIBE | DESC} , actual " + lexer.token() + ", " + lexer.info());
|
||||
}
|
||||
|
||||
return parseExplain(describe);
|
||||
@@ -798,7 +798,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
if (lexer.token() == Token.EXPLAIN) {
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("expect EXPLAIN , actual " + lexer.token());
|
||||
throw new ParserException("expect EXPLAIN , actual " + lexer.token() + ", " + lexer.info());
|
||||
}
|
||||
|
||||
return parseExplain(explain);
|
||||
@@ -1142,7 +1142,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
return stmt;
|
||||
}
|
||||
|
||||
throw new ParserException("TODO " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
}
|
||||
|
||||
if (identifierEquals(ENGINE)) {
|
||||
@@ -1522,7 +1522,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
|
||||
// MySqlShowSlaveHostsStatement
|
||||
throw new ParserException("TODO " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
}
|
||||
|
||||
private MySqlShowStatusStatement parseShowStatus() {
|
||||
@@ -1829,7 +1829,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
return stmt;
|
||||
}
|
||||
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
protected MySqlLoadXmlStatement parseLoadXml() {
|
||||
@@ -1878,7 +1878,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
accept(Token.SET);
|
||||
|
||||
if (lexer.token() != Token.LITERAL_CHARS) {
|
||||
throw new ParserException("syntax error, illegal charset");
|
||||
throw new ParserException("syntax error, illegal charset. " + lexer.info());
|
||||
}
|
||||
|
||||
String charset = lexer.stringVal();
|
||||
@@ -1895,11 +1895,11 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
|
||||
if (identifierEquals(IGNORE)) {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.SET) {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
|
||||
return stmt;
|
||||
@@ -1952,7 +1952,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
accept(Token.SET);
|
||||
|
||||
if (lexer.token() != Token.LITERAL_CHARS) {
|
||||
throw new ParserException("syntax error, illegal charset");
|
||||
throw new ParserException("syntax error, illegal charset. " + lexer.info());
|
||||
}
|
||||
|
||||
String charset = lexer.stringVal();
|
||||
@@ -2188,7 +2188,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
private void parseValueClause(List<ValuesClause> valueClauseList, int columnSize) {
|
||||
for (int i = 0; ; ++i) {
|
||||
if (lexer.token() != Token.LPAREN) {
|
||||
throw new ParserException("syntax error, expect ')'");
|
||||
throw new ParserException("syntax error, expect ')', " + lexer.info());
|
||||
}
|
||||
lexer.nextTokenValue();
|
||||
|
||||
@@ -2246,7 +2246,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
|
||||
if (lexer.token() != Token.RPAREN) {
|
||||
throw new ParserException("syntax error");
|
||||
throw new ParserException("syntax error. " + lexer.info());
|
||||
}
|
||||
|
||||
if (!parseCompleteValues && valueClauseList.size() >= parseValuesSize) {
|
||||
@@ -2321,7 +2321,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
stmt.setIsolationLevel("READ COMMITTED");
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("UNKOWN TRANSACTION LEVEL : " + lexer.stringVal());
|
||||
throw new ParserException("UNKOWN TRANSACTION LEVEL : " + lexer.stringVal() + ", " + lexer.info());
|
||||
}
|
||||
} else if (identifierEquals("SERIALIZABLE")) {
|
||||
stmt.setIsolationLevel("SERIALIZABLE");
|
||||
@@ -2332,10 +2332,10 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
stmt.setIsolationLevel("REPEATABLE READ");
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("UNKOWN TRANSACTION LEVEL : " + lexer.stringVal());
|
||||
throw new ParserException("UNKOWN TRANSACTION LEVEL : " + lexer.stringVal() + ", " + lexer.info());
|
||||
}
|
||||
} else {
|
||||
throw new ParserException("UNKOWN TRANSACTION LEVEL : " + lexer.stringVal());
|
||||
throw new ParserException("UNKOWN TRANSACTION LEVEL : " + lexer.stringVal() + ", " + lexer.info());
|
||||
}
|
||||
} else if (identifierEquals(READ)) {
|
||||
lexer.nextToken();
|
||||
@@ -2346,7 +2346,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
stmt.setAccessModel("WRITE");
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("UNKOWN ACCESS MODEL : " + lexer.stringVal());
|
||||
throw new ParserException("UNKOWN ACCESS MODEL : " + lexer.stringVal() + ", " + lexer.info());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2433,7 +2433,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
return parseAlterDatabase();
|
||||
}
|
||||
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
}
|
||||
|
||||
protected SQLStatement parseAlterTable(boolean ignore) {
|
||||
@@ -2508,7 +2508,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
SQLAlterTableAddConstraint item = new SQLAlterTableAddConstraint(unique);
|
||||
stmt.addItem(item);
|
||||
} else {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
}
|
||||
} else if (lexer.token() == Token.PARTITION) {
|
||||
lexer.nextToken();
|
||||
@@ -2529,9 +2529,9 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals(FULLTEXT)) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
} else if (identifierEquals(SPATIAL)) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
} else {
|
||||
parseAlterTableAddColumn(stmt);
|
||||
}
|
||||
@@ -2653,7 +2653,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
|
||||
return renameStmt;
|
||||
} else if (lexer.token() == Token.ORDER) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
} else if (identifierEquals("CONVERT")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.TO);
|
||||
@@ -2672,7 +2672,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
|
||||
stmt.addItem(item);
|
||||
} else if (lexer.token() == Token.DEFAULT) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
} else if (identifierEquals("DISCARD")) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -2742,7 +2742,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("FORCE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
} else if (identifierEquals("COALESCE")) {
|
||||
lexer.nextToken();
|
||||
accept(Token.PARTITION);
|
||||
@@ -2776,7 +2776,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
accept(Token.RPAREN);
|
||||
stmt.addItem(item);
|
||||
} else if (identifierEquals("EXCHANGE")) {
|
||||
throw new ParserException("TODO " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
} else if (lexer.token() == Token.OPTIMIZE) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -2902,7 +2902,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
lexer.nextToken();
|
||||
stmt.getTableOptions().put("ROW_FORMAT", rowFormat);
|
||||
} else {
|
||||
throw new ParserException("illegal syntax.");
|
||||
throw new ParserException("illegal syntax. " + lexer.info());
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -3486,7 +3486,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
statementList.add(this.parseSelect());
|
||||
continue;
|
||||
} else {
|
||||
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
}
|
||||
// assign statement
|
||||
@@ -3589,7 +3589,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
}
|
||||
|
||||
}
|
||||
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO, " + lexer.info());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3814,7 +3814,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
|
||||
break;
|
||||
} else {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
}
|
||||
return stmt;
|
||||
@@ -4009,7 +4009,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
lexer.reset(bp, ch, Token.LPAREN);
|
||||
return this.parseSelect();
|
||||
} else {
|
||||
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
|
||||
throw new ParserException("TODO. " + lexer.info());
|
||||
}
|
||||
}
|
||||
// assign statement
|
||||
@@ -4017,7 +4017,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
return parseAssign();
|
||||
}
|
||||
|
||||
throw new ParserException("error sp_statement");
|
||||
throw new ParserException("error sp_statement. " + lexer.info());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4042,7 +4042,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
} else if (lexer.token() == Token.UNDO) {
|
||||
stmt.setHandleType(MySqlHandlerType.CONTINUE);
|
||||
} else {
|
||||
throw new ParserException("unkown handle type");
|
||||
throw new ParserException("unkown handle type. " + lexer.info());
|
||||
}
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -4140,7 +4140,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
condition.setValue(lexer.integerValue().toString());
|
||||
lexer.nextToken();
|
||||
} else {
|
||||
throw new ParserException("declare condition grammer error.");
|
||||
throw new ParserException("declare condition grammer error. " + lexer.info());
|
||||
}
|
||||
|
||||
stmt.setConditionValue(condition);
|
||||
|
||||
Reference in New Issue
Block a user