Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
58c1f264
提交
58c1f264
authored
6月 04, 2014
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Large result sets now always create temporary tables instead of temporary files.
上级
2b0e00a1
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
21 行增加
和
17 行删除
+21
-17
SelectUnion.java
h2/src/main/org/h2/command/dml/SelectUnion.java
+4
-2
MVTable.java
h2/src/main/org/h2/mvstore/db/MVTable.java
+2
-0
TransactionStore.java
h2/src/main/org/h2/mvstore/db/TransactionStore.java
+0
-4
ResultTempTable.java
h2/src/main/org/h2/result/ResultTempTable.java
+12
-4
RegularTable.java
h2/src/main/org/h2/table/RegularTable.java
+2
-0
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-7
没有找到文件。
h2/src/main/org/h2/command/dml/SelectUnion.java
浏览文件 @
58c1f264
...
...
@@ -191,8 +191,8 @@ public class SelectUnion extends Query {
default
:
DbException
.
throwInternalError
(
"type="
+
unionType
);
}
ResultInterface
l
=
left
.
query
(
0
);
ResultInterface
r
=
right
.
query
(
0
);
LocalResult
l
=
left
.
query
(
0
);
LocalResult
r
=
right
.
query
(
0
);
l
.
reset
();
r
.
reset
();
switch
(
unionType
)
{
...
...
@@ -242,6 +242,8 @@ public class SelectUnion extends Query {
result
.
setLimit
(
v
.
getInt
());
}
}
l
.
close
();
r
.
close
();
result
.
done
();
if
(
target
!=
null
)
{
while
(
result
.
next
())
{
...
...
h2/src/main/org/h2/mvstore/db/MVTable.java
浏览文件 @
58c1f264
...
...
@@ -711,6 +711,8 @@ public class MVTable extends TableBase {
if
(
index
.
getName
()
!=
null
)
{
database
.
removeSchemaObject
(
session
,
index
);
}
// needed for session temporary indexes
indexes
.
remove
(
index
);
}
if
(
SysProperties
.
CHECK
)
{
for
(
SchemaObject
obj
:
database
.
getAllSchemaObjects
(
DbObject
.
INDEX
))
{
...
...
h2/src/main/org/h2/mvstore/db/TransactionStore.java
浏览文件 @
58c1f264
...
...
@@ -762,10 +762,6 @@ public class TransactionStore {
* Commit the transaction. Afterwards, this transaction is closed.
*/
public
void
commit
()
{
if
(
status
==
STATUS_CLOSED
)
{
// TODO analyze why this happens
return
;
}
checkNotClosed
();
store
.
commit
(
this
,
logId
);
}
...
...
h2/src/main/org/h2/result/ResultTempTable.java
浏览文件 @
58c1f264
...
...
@@ -114,7 +114,6 @@ public class ResultTempTable implements ResultExternal {
IndexType
indexType
=
IndexType
.
createNonUnique
(
true
);
index
=
table
.
addIndex
(
session
,
indexName
,
indexId
,
indexCols
,
indexType
,
true
,
null
);
index
.
setTemporary
(
true
);
}
@Override
...
...
@@ -221,13 +220,22 @@ public class ResultTempTable implements ResultExternal {
// time. (the table is truncated, so this is just one record)
if
(!
database
.
isSysTableLocked
())
{
Session
sysSession
=
database
.
getSystemSession
();
table
.
removeChildrenAndResources
(
sysSession
);
if
(
index
!=
null
)
{
index
.
removeChildrenAndResources
(
sysSession
);
// need to explicitly do this,
// as it's not registered in the system session
session
.
removeLocalTempTableIndex
(
index
);
}
table
.
removeChildrenAndResources
(
sysSession
);
// the transaction must be committed immediately
// TODO this synchronization cascade is very ugly
synchronized
(
session
)
{
synchronized
(
database
)
{
synchronized
(
sysSession
)
{
sysSession
.
commit
(
false
);
}
}
}
}
}
finally
{
table
=
null
;
}
...
...
h2/src/main/org/h2/table/RegularTable.java
浏览文件 @
58c1f264
...
...
@@ -700,6 +700,8 @@ public class RegularTable extends TableBase {
if
(
index
.
getName
()
!=
null
)
{
database
.
removeSchemaObject
(
session
,
index
);
}
// needed for session temporary indexes
indexes
.
remove
(
index
);
}
if
(
SysProperties
.
CHECK
)
{
for
(
SchemaObject
obj
:
database
.
getAllSchemaObjects
(
DbObject
.
INDEX
))
{
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
58c1f264
...
...
@@ -386,13 +386,7 @@ java org.h2.test.TestAll timer
// use lower values, to better test those cases,
// and to speed up the tests (for delays)
;
// TEST
// System.setProperty("h2.maxMemoryRows", "2");
System
.
setProperty
(
"h2.maxMemoryRows"
,
"10"
);
// System.setProperty("h2.maxMemoryRows", "1000");
// System.setProperty("h2.maxMemoryRows", "2");
System
.
setProperty
(
"h2.maxMemoryRows"
,
"100"
);
System
.
setProperty
(
"h2.check2"
,
"true"
);
System
.
setProperty
(
"h2.delayWrongPasswordMin"
,
"0"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论