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

Check compareType in ConditionInSelect.createIndexConditions()

上级 2943366e
......@@ -169,6 +169,9 @@ public class ConditionInSelect extends Condition {
if (!session.getDatabase().getSettings().optimizeInList) {
return;
}
if (compareType != Comparison.EQUAL) {
return;
}
if (!(left instanceof ExpressionColumn)) {
return;
}
......
......@@ -439,3 +439,15 @@ SELECT 1 FROM TEST HAVING TRUE FOR UPDATE;
DROP TABLE TEST;
> ok
CREATE TABLE TEST(ID INT PRIMARY KEY) AS SELECT X FROM SYSTEM_RANGE(1, 3);
> ok
SELECT * FROM TEST WHERE ID != ALL (SELECT ID FROM TEST WHERE ID IN(1, 3));
> ID
> --
> 2
> rows: 1
DROP TABLE TEST;
> ok
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论