提交 98b53a8c authored 作者: Noel Grandin's avatar Noel Grandin

more parsing errors found by TestRandomSQL

上级 af115114
......@@ -2626,6 +2626,9 @@ public class Parser {
read("OVER");
read("(");
read(")");
if (currentSelect == null && currentPrepared == null) {
throw getSyntaxError();
}
return new Rownum(currentSelect == null ? currentPrepared
: currentSelect);
default:
......@@ -2963,6 +2966,9 @@ public class Parser {
if (readIf("(")) {
read(")");
}
if (currentSelect == null && currentPrepared == null) {
throw getSyntaxError();
}
r = new Rownum(currentSelect == null ? currentPrepared
: currentSelect);
break;
......
......@@ -21,6 +21,9 @@ public class Rownum extends Expression {
private final Prepared prepared;
public Rownum(Prepared prepared) {
if (prepared == null) {
throw DbException.throwInternalError();
}
this.prepared = prepared;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论