Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
4232718e
提交
4232718e
authored
11月 23, 2015
作者:
S.Vladykin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
58425db8
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
13 行增加
和
15 行删除
+13
-15
Delete.java
h2/src/main/org/h2/command/dml/Delete.java
+1
-1
Select.java
h2/src/main/org/h2/command/dml/Select.java
+3
-1
Update.java
h2/src/main/org/h2/command/dml/Update.java
+1
-1
TableFilter.java
h2/src/main/org/h2/table/TableFilter.java
+8
-12
没有找到文件。
h2/src/main/org/h2/command/dml/Delete.java
浏览文件 @
4232718e
...
@@ -132,7 +132,7 @@ public class Delete extends Prepared {
...
@@ -132,7 +132,7 @@ public class Delete extends Prepared {
}
}
PlanItem
item
=
tableFilter
.
getBestPlanItem
(
session
,
new
TableFilter
[]{
tableFilter
},
0
);
PlanItem
item
=
tableFilter
.
getBestPlanItem
(
session
,
new
TableFilter
[]{
tableFilter
},
0
);
tableFilter
.
setPlanItem
(
item
);
tableFilter
.
setPlanItem
(
item
);
tableFilter
.
prepare
(
false
);
tableFilter
.
prepare
();
}
}
@Override
@Override
...
...
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
4232718e
...
@@ -1010,7 +1010,9 @@ public class Select extends Query {
...
@@ -1010,7 +1010,9 @@ public class Select extends Query {
setEvaluatableRecursive
(
topTableFilter
);
setEvaluatableRecursive
(
topTableFilter
);
topTableFilter
.
prepare
(
parse
);
if
(!
parse
)
{
topTableFilter
.
prepare
();
}
return
planCost
;
return
planCost
;
}
}
...
...
h2/src/main/org/h2/command/dml/Update.java
浏览文件 @
4232718e
...
@@ -189,7 +189,7 @@ public class Update extends Prepared {
...
@@ -189,7 +189,7 @@ public class Update extends Prepared {
}
}
PlanItem
item
=
tableFilter
.
getBestPlanItem
(
session
,
new
TableFilter
[]
{
tableFilter
},
0
);
PlanItem
item
=
tableFilter
.
getBestPlanItem
(
session
,
new
TableFilter
[]
{
tableFilter
},
0
);
tableFilter
.
setPlanItem
(
item
);
tableFilter
.
setPlanItem
(
item
);
tableFilter
.
prepare
(
false
);
tableFilter
.
prepare
();
}
}
@Override
@Override
...
...
h2/src/main/org/h2/table/TableFilter.java
浏览文件 @
4232718e
...
@@ -269,10 +269,8 @@ public class TableFilter implements ColumnResolver {
...
@@ -269,10 +269,8 @@ public class TableFilter implements ColumnResolver {
/**
/**
* Prepare reading rows. This method will remove all index conditions that
* Prepare reading rows. This method will remove all index conditions that
* can not be used, and optimize the conditions.
* can not be used, and optimize the conditions.
*
* @param parse if we are parsing sub-query
*/
*/
public
void
prepare
(
boolean
parse
)
{
public
void
prepare
()
{
// forget all unused index conditions
// forget all unused index conditions
// the indexConditions list may be modified here
// the indexConditions list may be modified here
for
(
int
i
=
0
;
i
<
indexConditions
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
indexConditions
.
size
();
i
++)
{
...
@@ -291,21 +289,19 @@ public class TableFilter implements ColumnResolver {
...
@@ -291,21 +289,19 @@ public class TableFilter implements ColumnResolver {
if
(
SysProperties
.
CHECK
&&
nestedJoin
==
this
)
{
if
(
SysProperties
.
CHECK
&&
nestedJoin
==
this
)
{
DbException
.
throwInternalError
(
"self join"
);
DbException
.
throwInternalError
(
"self join"
);
}
}
nestedJoin
.
prepare
(
parse
);
nestedJoin
.
prepare
();
}
}
if
(
join
!=
null
)
{
if
(
join
!=
null
)
{
if
(
SysProperties
.
CHECK
&&
join
==
this
)
{
if
(
SysProperties
.
CHECK
&&
join
==
this
)
{
DbException
.
throwInternalError
(
"self join"
);
DbException
.
throwInternalError
(
"self join"
);
}
}
join
.
prepare
(
parse
);
join
.
prepare
();
}
}
if
(!
parse
)
{
if
(
filterCondition
!=
null
)
{
if
(
filterCondition
!=
null
)
{
filterCondition
=
filterCondition
.
optimize
(
session
);
filterCondition
=
filterCondition
.
optimize
(
session
);
}
}
if
(
joinCondition
!=
null
)
{
if
(
joinCondition
!=
null
)
{
joinCondition
=
joinCondition
.
optimize
(
session
);
joinCondition
=
joinCondition
.
optimize
(
session
);
}
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论