提交 1dc946ee authored 作者: Thomas Mueller's avatar Thomas Mueller

Nested IN(IN(...)) didn't work.

上级 06684596
......@@ -216,6 +216,9 @@ public class ConditionIn extends Condition {
if (!areAllValues(ExpressionVisitor.get(ExpressionVisitor.EVALUATABLE))) {
return this;
}
if (!areAllValues(ExpressionVisitor.get(ExpressionVisitor.INDEPENDENT))) {
return this;
}
if (!(left instanceof ExpressionColumn)) {
return this;
}
......
......@@ -136,6 +136,9 @@ public class ConditionInSelect extends Condition {
if (!query.isEverything(ExpressionVisitor.EVALUATABLE)) {
return this;
}
if (!query.isEverything(ExpressionVisitor.INDEPENDENT)) {
return this;
}
String alias = query.getFirstColumnAlias(session);
if (alias == null) {
return this;
......
......@@ -3,6 +3,8 @@ create table test(id identity);
> ok
select 1 from test a where 1 in(select 1 from test b where b.id in(select 1 from test c where c.id=a.id));
> 1
> -
> rows: 0
drop table test;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论