bug fixed for sql parser. issue #1898

This commit is contained in:
wenshao
2017-08-14 21:29:39 +08:00
parent e210b1608a
commit 5a201ce33c
6 changed files with 83 additions and 19 deletions
@@ -652,6 +652,12 @@ public class SQLExprParser extends SQLParser {
lexer.nextToken();
sqlExpr = new SQLBooleanExpr(false);
break;
case BITS: {
String strVal = lexer.stringVal();
lexer.nextToken();
sqlExpr = new SQLBinaryExpr(strVal);
break;
}
default:
throw new ParserException("ERROR" + lexer.info());
}
@@ -130,6 +130,8 @@ public enum Token {
SHOW("SHOW"),
REPLACE("REPLACE"),
BITS,
// MySql procedure add by zz
WHILE("WHILE"),
DO("DO"),
@@ -256,7 +258,7 @@ public enum Token {
LITERAL_HEX,
LITERAL_CHARS,
LITERAL_NCHARS,
LITERAL_ALIAS,
LINE_COMMENT,
MULTI_LINE_COMMENT,