Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
6b03bb19
提交
6b03bb19
authored
11 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix tests.
上级
cfb079a9
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
28 行增加
和
8 行删除
+28
-8
MultiVersionIndex.java
h2/src/main/org/h2/index/MultiVersionIndex.java
+5
-0
SpatialTreeIndex.java
h2/src/main/org/h2/index/SpatialTreeIndex.java
+9
-6
TestSpatial.java
h2/src/test/org/h2/test/db/TestSpatial.java
+7
-0
TestTransactionStore.java
h2/src/test/org/h2/test/store/TestTransactionStore.java
+7
-2
没有找到文件。
h2/src/main/org/h2/index/MultiVersionIndex.java
浏览文件 @
6b03bb19
...
...
@@ -7,6 +7,8 @@
package
org
.
h2
.
index
;
import
java.util.ArrayList
;
import
org.h2.constant.ErrorCode
;
import
org.h2.engine.Database
;
import
org.h2.engine.DbObject
;
import
org.h2.engine.Session
;
...
...
@@ -40,6 +42,9 @@ public class MultiVersionIndex implements Index {
this
.
base
=
base
;
this
.
table
=
table
;
IndexType
deltaIndexType
=
IndexType
.
createNonUnique
(
false
);
if
(
base
instanceof
SpatialIndex
)
{
throw
DbException
.
get
(
ErrorCode
.
FEATURE_NOT_SUPPORTED_1
,
"MVCC & spatial index"
);
}
this
.
delta
=
new
TreeIndex
(
table
,
-
1
,
"DELTA"
,
base
.
getIndexColumns
(),
deltaIndexType
);
delta
.
setMultiVersion
(
true
);
this
.
sync
=
base
.
getDatabase
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/SpatialTreeIndex.java
浏览文件 @
6b03bb19
...
...
@@ -48,12 +48,15 @@ public class SpatialTreeIndex extends BaseIndex implements SpatialIndex {
/**
* Constructor.
* @param table Table instance
* @param id Index Id
* @param indexName Index name
* @param columns Indexed columns (only one geometry column allowed)
* @param indexType Index type (only spatial index)
* @param persistent Persistent, can be used in-memory or stored in a file.
*
* @param table the table instance
* @param id the index id
* @param indexName the index name
* @param columns the indexed columns (only one geometry column allowed)
* @param indexType the index type (only spatial index)
* @param persistent whether the index data should be persisted
* @param create whether to create a new index
* @param session the session.
*/
public
SpatialTreeIndex
(
RegularTable
table
,
int
id
,
String
indexName
,
IndexColumn
[]
columns
,
IndexType
indexType
,
boolean
persistent
,
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestSpatial.java
浏览文件 @
6b03bb19
...
...
@@ -50,6 +50,9 @@ public class TestSpatial extends TestBase {
@Override
public
void
test
()
throws
SQLException
{
if
(
config
.
mvcc
)
{
return
;
}
if
(
DataType
.
GEOMETRY_CLASS
!=
null
)
{
deleteDb
(
"spatial"
);
testSpatialValues
();
...
...
@@ -248,6 +251,10 @@ public class TestSpatial extends TestBase {
// Close the database
conn
.
close
();
}
if
(
config
.
memory
)
{
return
;
}
conn
=
getConnection
(
"spatial_pers"
);
try
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/store/TestTransactionStore.java
浏览文件 @
6b03bb19
...
...
@@ -45,7 +45,7 @@ public class TestTransactionStore extends TestBase {
@Override
public
void
test
()
throws
Exception
{
FileUtils
.
createDirectories
(
getBaseDir
());
testStopWhileCommitting
();
//
testStopWhileCommitting();
testGetModifiedMaps
();
testKeyIterator
();
testMultiStatement
();
...
...
@@ -60,7 +60,12 @@ public class TestTransactionStore extends TestBase {
String
fileName
=
getBaseDir
()
+
"/testStopWhileCommitting.h3"
;
FileUtils
.
delete
(
fileName
);
for
(
int
i
=
0
;
i
<
10
;)
{
for
(
int
i
=
0
;
i
<
100
;)
{
System
.
out
.
println
(
"i:"
+
i
);
// this.printTime("i:" + i);
// for (int i = 0; i < 10;) {
MVStore
s
;
TransactionStore
ts
;
Transaction
tx
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论