提交 dd717e08 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Detect stray NOT in Parser.readCondition()

上级 a85de5f6
...@@ -2846,6 +2846,9 @@ public class Parser { ...@@ -2846,6 +2846,9 @@ public class Parser {
Comparison.BIGGER_EQUAL, high, r); Comparison.BIGGER_EQUAL, high, r);
r = new ConditionAndOr(ConditionAndOr.AND, condLow, condHigh); r = new ConditionAndOr(ConditionAndOr.AND, condLow, condHigh);
} else { } else {
if (not) {
throw getSyntaxError();
}
int compareType = getCompareType(currentTokenType); int compareType = getCompareType(currentTokenType);
if (compareType < 0) { if (compareType < 0) {
break; break;
......
...@@ -11,3 +11,9 @@ select * from test where id = (1, 2); ...@@ -11,3 +11,9 @@ select * from test where id = (1, 2);
drop table test; drop table test;
> ok > ok
SELECT 1 + 2 NOT;
> exception SYNTAX_ERROR_2
SELECT 1 NOT > 2;
> exception SYNTAX_ERROR_2
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论