Merge pull request #688 from wenshao/master

bug fixed for sql parser
This commit is contained in:
高铁
2014-10-27 16:18:56 +08:00
5 changed files with 39 additions and 20 deletions
@@ -82,15 +82,6 @@ public class MySqlExprParser extends SQLExprParser {
return new SQLBinaryOpExpr(expr, SQLBinaryOperator.RegExp, rightExp);
}
if (identifierEquals("RLIKE")) {
lexer.nextToken();
SQLExpr rightExp = equality();
rightExp = relationalRest(rightExp);
return new SQLBinaryOpExpr(expr, SQLBinaryOperator.RegExp, rightExp);
}
return super.relationalRest(expr);
}
@@ -117,15 +108,6 @@ public class MySqlExprParser extends SQLExprParser {
return new SQLBinaryOpExpr(expr, SQLBinaryOperator.NotRegExp, rightExp);
}
if (identifierEquals("RLIKE")) {
lexer.nextToken();
SQLExpr rightExp = primary();
rightExp = relationalRest(rightExp);
return new SQLBinaryOpExpr(expr, SQLBinaryOperator.NotRLike, rightExp);
}
return super.notRationalRest(expr);
}