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

Detect stray NOT in Parser.readCondition()

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