Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
85058c5d
提交
85058c5d
authored
7 年前
作者:
Owner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed debug code and old recursive detection code
上级
54e6e45c
master
version-1.4.198
version-1.4.197
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
1 行增加
和
19 行删除
+1
-19
Select.java
h2/src/main/org/h2/command/dml/Select.java
+1
-13
ViewIndex.java
h2/src/main/org/h2/index/ViewIndex.java
+0
-6
没有找到文件。
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
85058c5d
...
...
@@ -569,8 +569,7 @@ public class Select extends Query {
}
boolean
lazy
=
session
.
isLazyQueryExecution
()
&&
target
==
null
&&
!
isForUpdate
&&
!
isQuickAggregateQuery
&&
limitRows
!=
0
&&
offsetExpr
==
null
&&
isReadOnly
()
&&
!
hasRecursiveTopTableView
();
limitRows
!=
0
&&
offsetExpr
==
null
&&
isReadOnly
();
int
columnCount
=
expressions
.
size
();
LocalResult
result
=
null
;
if
(!
lazy
&&
(
target
==
null
||
...
...
@@ -664,17 +663,6 @@ public class Select extends Query {
return
null
;
}
private
boolean
hasRecursiveTopTableView
()
{
//check the top table filter only to see if we have a recursive table query
// if(this.topTableFilter.getTable().isTableExpression()){
// TableView v = (TableView)this.topTableFilter.getTable();
// if(v.isRecursive()){
// return true;
// }
// }
return
false
;
}
private
void
resetJoinBatchAfterQuery
()
{
JoinBatch
jb
=
getJoinBatch
();
if
(
jb
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/ViewIndex.java
浏览文件 @
85058c5d
...
...
@@ -185,7 +185,6 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
ResultInterface
recursiveResult
=
view
.
getRecursiveResult
();
if
(
recursiveResult
!=
null
)
{
recursiveResult
.
reset
();
//System.out.println("findRecursive.return ViewCursor=recResult="+recursiveResult+",first="+first+",last="+last);
return
new
ViewCursor
(
this
,
recursiveResult
,
first
,
last
);
}
if
(
query
==
null
)
{
...
...
@@ -193,7 +192,6 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
parser
.
setRightsChecked
(
true
);
parser
.
setSuppliedParameterList
(
originalParameters
);
query
=
(
Query
)
parser
.
prepare
(
querySQL
);
//System.out.println("findRecursive.querySQL="+querySQL);
query
.
setNeverLazy
(
true
);
}
if
(!
query
.
isUnion
())
{
...
...
@@ -212,12 +210,10 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
localResult
.
setMaxMemoryRows
(
Integer
.
MAX_VALUE
);
while
(
resultInterface
.
next
())
{
Value
[]
cr
=
resultInterface
.
currentRow
();
//System.out.println("findRecursive.while left resultinterface next row="+Arrays.toString(cr));
localResult
.
addRow
(
cr
);
}
Query
right
=
union
.
getRight
();
right
.
setNeverLazy
(
true
);
//System.out.println("right="+right.getSQL());
resultInterface
.
reset
();
view
.
setRecursiveResult
(
resultInterface
);
// to ensure the last result is not closed
...
...
@@ -225,12 +221,10 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
while
(
true
)
{
resultInterface
=
right
.
query
(
0
);
if
(!
resultInterface
.
hasNext
())
{
//System.out.println("right query has no results");
break
;
}
while
(
resultInterface
.
next
())
{
Value
[]
cr
=
resultInterface
.
currentRow
();
//System.out.println("findRecursive.while right resultinterface next row="+Arrays.toString(cr));
localResult
.
addRow
(
cr
);
}
resultInterface
.
reset
();
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论