Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
5ff23847
提交
5ff23847
authored
12 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MVStore: table engine
上级
fa09b19c
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
11 行增加
和
14 行删除
+11
-14
MVPrimaryIndex.java
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
+5
-3
MVTable.java
h2/src/main/org/h2/mvstore/db/MVTable.java
+1
-7
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+4
-4
test.properties
h2/src/test/org/h2/test/bench/test.properties
+1
-0
没有找到文件。
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
浏览文件 @
5ff23847
...
@@ -34,7 +34,7 @@ public class MVPrimaryIndex extends BaseIndex {
...
@@ -34,7 +34,7 @@ public class MVPrimaryIndex extends BaseIndex {
protected
final
MVTable
mvTable
;
protected
final
MVTable
mvTable
;
protected
MVMap
<
Long
,
Value
[]>
map
;
protected
MVMap
<
Long
,
Value
[]>
map
;
private
long
nex
tKey
;
private
long
las
tKey
;
private
int
mainIndexColumn
=
-
1
;
private
int
mainIndexColumn
=
-
1
;
public
MVPrimaryIndex
(
Database
db
,
MVTable
table
,
int
id
,
IndexColumn
[]
columns
,
public
MVPrimaryIndex
(
Database
db
,
MVTable
table
,
int
id
,
IndexColumn
[]
columns
,
...
@@ -50,7 +50,7 @@ public class MVPrimaryIndex extends BaseIndex {
...
@@ -50,7 +50,7 @@ public class MVPrimaryIndex extends BaseIndex {
map
=
new
MVMap
<
Long
,
Value
[]>(
new
ObjectDataType
(),
t
);
map
=
new
MVMap
<
Long
,
Value
[]>(
new
ObjectDataType
(),
t
);
map
=
table
.
getStore
().
openMap
(
getName
()
+
"_"
+
getId
(),
map
);
map
=
table
.
getStore
().
openMap
(
getName
()
+
"_"
+
getId
(),
map
);
Long
k
=
map
.
lastKey
();
Long
k
=
map
.
lastKey
();
nextKey
=
k
==
null
?
0
:
k
+
1
;
lastKey
=
k
==
null
?
0
:
k
;
}
}
public
void
renameTable
(
String
newName
)
{
public
void
renameTable
(
String
newName
)
{
...
@@ -82,7 +82,9 @@ public class MVPrimaryIndex extends BaseIndex {
...
@@ -82,7 +82,9 @@ public class MVPrimaryIndex extends BaseIndex {
@Override
@Override
public
void
add
(
Session
session
,
Row
row
)
{
public
void
add
(
Session
session
,
Row
row
)
{
if
(
mainIndexColumn
==
-
1
)
{
if
(
mainIndexColumn
==
-
1
)
{
row
.
setKey
(
nextKey
++);
if
(
row
.
getKey
()
==
0
)
{
row
.
setKey
(++
lastKey
);
}
}
else
{
}
else
{
Long
c
=
row
.
getValue
(
mainIndexColumn
).
getLong
();
Long
c
=
row
.
getValue
(
mainIndexColumn
).
getLong
();
row
.
setKey
(
c
);
row
.
setKey
(
c
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/db/MVTable.java
浏览文件 @
5ff23847
...
@@ -46,7 +46,6 @@ public class MVTable extends TableBase {
...
@@ -46,7 +46,6 @@ public class MVTable extends TableBase {
private
final
String
storeName
;
private
final
String
storeName
;
private
final
MVStore
store
;
private
final
MVStore
store
;
private
final
boolean
hidden
;
private
MVPrimaryIndex
primaryIndex
;
private
MVPrimaryIndex
primaryIndex
;
private
ArrayList
<
Index
>
indexes
=
New
.
arrayList
();
private
ArrayList
<
Index
>
indexes
=
New
.
arrayList
();
private
long
lastModificationId
;
private
long
lastModificationId
;
...
@@ -66,7 +65,7 @@ public class MVTable extends TableBase {
...
@@ -66,7 +65,7 @@ public class MVTable extends TableBase {
super
(
data
);
super
(
data
);
this
.
storeName
=
storeName
;
this
.
storeName
=
storeName
;
this
.
store
=
store
;
this
.
store
=
store
;
this
.
h
idden
=
data
.
isHidden
;
this
.
isH
idden
=
data
.
isHidden
;
traceLock
=
database
.
getTrace
(
Trace
.
LOCK
);
traceLock
=
database
.
getTrace
(
Trace
.
LOCK
);
}
}
...
@@ -305,11 +304,6 @@ public class MVTable extends TableBase {
...
@@ -305,11 +304,6 @@ public class MVTable extends TableBase {
}
}
}
}
@Override
public
boolean
isHidden
()
{
return
hidden
;
}
@Override
@Override
public
boolean
canTruncate
()
{
public
boolean
canTruncate
()
{
// TODO copy & pasted source code from RegularTable
// TODO copy & pasted source code from RegularTable
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
5ff23847
...
@@ -556,16 +556,16 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
...
@@ -556,16 +556,16 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
beforeTest
();
beforeTest
();
// db
// db
//
new TestScriptSimple().runTest(this);
new
TestScriptSimple
().
runTest
(
this
);
new
TestScript
().
runTest
(
this
);
new
TestScript
().
runTest
(
this
);
new
TestAlter
().
runTest
(
this
);
new
TestAlter
().
runTest
(
this
);
new
TestAlterSchemaRename
().
runTest
(
this
);
new
TestAlterSchemaRename
().
runTest
(
this
);
new
TestAutoRecompile
().
runTest
(
this
);
new
TestAutoRecompile
().
runTest
(
this
);
new
TestBitField
().
runTest
(
this
);
new
TestBitField
().
runTest
(
this
);
//
new TestBackup().runTest(this);
new
TestBackup
().
runTest
(
this
);
new
TestBigDb
().
runTest
(
this
);
new
TestBigDb
().
runTest
(
this
);
new
TestBigResult
().
runTest
(
this
);
new
TestBigResult
().
runTest
(
this
);
new
TestCases
().
runTest
(
this
);
// <<=
new
TestCases
().
runTest
(
this
);
new
TestCheckpoint
().
runTest
(
this
);
new
TestCheckpoint
().
runTest
(
this
);
new
TestCluster
().
runTest
(
this
);
new
TestCluster
().
runTest
(
this
);
new
TestCompatibility
().
runTest
(
this
);
new
TestCompatibility
().
runTest
(
this
);
...
@@ -630,7 +630,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
...
@@ -630,7 +630,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
new
TestLimitUpdates
().
runTest
(
this
);
new
TestLimitUpdates
().
runTest
(
this
);
new
TestLobApi
().
runTest
(
this
);
new
TestLobApi
().
runTest
(
this
);
new
TestManyJdbcObjects
().
runTest
(
this
);
new
TestManyJdbcObjects
().
runTest
(
this
);
new
TestMetaData
().
runTest
(
this
);
// <<=
new
TestMetaData
().
runTest
(
this
);
new
TestNativeSQL
().
runTest
(
this
);
new
TestNativeSQL
().
runTest
(
this
);
new
TestPreparedStatement
().
runTest
(
this
);
new
TestPreparedStatement
().
runTest
(
this
);
new
TestResultSet
().
runTest
(
this
);
new
TestResultSet
().
runTest
(
this
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/bench/test.properties
浏览文件 @
5ff23847
db1
=
H2, org.h2.Driver, jdbc:h2:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3, sa, sa
db1
=
H2, org.h2.Driver, jdbc:h2:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3, sa, sa
#xdb1 = H2, org.h2.Driver, jdbc:h2:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3;DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine, sa, sa
#xdb1 = H2, org.h2.Driver, jdbc:h2:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3;DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine, sa, sa
#xdb1 = H2, org.h2.Driver, jdbc:h2:data/test;LOG=1;LOCK_TIMEOUT=10000;LOCK_MODE=3;ACCESS_MODE_DATA=rwd, sa, sa
#xdb1 = H2, org.h2.Driver, jdbc:h2:data/test;LOG=1;LOCK_TIMEOUT=10000;LOCK_MODE=3;ACCESS_MODE_DATA=rwd, sa, sa
#xdb2 = H2 (nio), org.h2.Driver, jdbc:h2:nio:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3, sa, sa
#xdb2 = H2 (nio), org.h2.Driver, jdbc:h2:nio:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3, sa, sa
#xdb3 = H2 (nioMapped), org.h2.Driver, jdbc:h2:nioMapped:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3, sa, sa
#xdb3 = H2 (nioMapped), org.h2.Driver, jdbc:h2:nioMapped:data/test;LOCK_TIMEOUT=10000;LOCK_MODE=3, sa, sa
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论