bug fixed for mysql parser, for issue #2718

This commit is contained in:
wenshao
2018-07-20 09:47:43 +08:00
parent 6572e9a20c
commit b3572b7601
2 changed files with 39 additions and 0 deletions
@@ -2270,6 +2270,8 @@ public class SQLExprParser extends SQLParser {
}
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.Equality, rightExp, dbType);
} else {
return expr;
}
break;
case TILDE:
@@ -2281,6 +2283,8 @@ public class SQLExprParser extends SQLParser {
rightExp = relationalRest(rightExp);
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.POSIX_Regular_Match, rightExp, getDbType());
} else {
return expr;
}
break;
case TILDE_STAR:
@@ -2288,6 +2292,8 @@ public class SQLExprParser extends SQLParser {
lexer.nextToken();
rightExp = relational();
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.POSIX_Regular_Match_Insensitive, rightExp, getDbType());
} else {
return expr;
}
break;
case BANG_TILDE:
@@ -2295,6 +2301,8 @@ public class SQLExprParser extends SQLParser {
lexer.nextToken();
rightExp = relational();
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.POSIX_Regular_Not_Match, rightExp, getDbType());
} else {
return expr;
}
break;
case BANG_TILDE_STAR:
@@ -2302,6 +2310,8 @@ public class SQLExprParser extends SQLParser {
lexer.nextToken();
rightExp = relational();
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.POSIX_Regular_Not_Match_POSIX_Regular_Match_Insensitive, rightExp, getDbType());
} else {
return expr;
}
break;
case TILDE_EQ:
@@ -2309,6 +2319,8 @@ public class SQLExprParser extends SQLParser {
lexer.nextToken();
rightExp = relational();
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.SAME_AS, rightExp, getDbType());
} else {
return expr;
}
break;
case RLIKE:
@@ -2338,6 +2350,8 @@ public class SQLExprParser extends SQLParser {
rightExp = relational();
expr = new SQLBinaryOpExpr(expr, SQLBinaryOperator.SIMILAR_TO, rightExp, getDbType());
} else {
return expr;
}
break;
default: