Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f45a31b0
提交
f45a31b0
authored
5月 21, 2013
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MVStoreTableEngine
上级
4ff230dc
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
19 行增加
和
13 行删除
+19
-13
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
MVMap.java
h2/src/main/org/h2/mvstore/MVMap.java
+1
-1
MVPrimaryIndex.java
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
+2
-1
MVSecondaryIndex.java
h2/src/main/org/h2/mvstore/db/MVSecondaryIndex.java
+5
-2
TransactionStore.java
h2/src/main/org/h2/mvstore/db/TransactionStore.java
+10
-8
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
f45a31b0
...
@@ -23,7 +23,7 @@ Change Log
...
@@ -23,7 +23,7 @@ Change Log
in a strange exception of the type "column x must be included in the group by list".
in a strange exception of the type "column x must be included in the group by list".
</li><li>
Issue 454: Use Charset for type-safety.
</li><li>
Issue 454: Use Charset for type-safety.
</li><li>
Queries with both LIMIT and OFFSET could throw an IllegalArgumentException.
</li><li>
Queries with both LIMIT and OFFSET could throw an IllegalArgumentException.
</li><li>
MVStore: multiple issues were fixed: 460, 461, 462, 464.
</li><li>
MVStore: multiple issues were fixed: 460, 461, 462, 464
, 466
.
</li><li>
MVStore: larger stores (multiple GB) are now much faster.
</li><li>
MVStore: larger stores (multiple GB) are now much faster.
</li><li>
When using local temporary tables and not dropping them manually before closing the session,
</li><li>
When using local temporary tables and not dropping them manually before closing the session,
and then killing the process could result in a database that couldn't be opened (except when using
and then killing the process could result in a database that couldn't be opened (except when using
...
...
h2/src/main/org/h2/mvstore/MVMap.java
浏览文件 @
f45a31b0
...
@@ -926,8 +926,8 @@ public class MVMap<K, V> extends AbstractMap<K, V>
...
@@ -926,8 +926,8 @@ public class MVMap<K, V> extends AbstractMap<K, V>
"This map is read-only"
);
"This map is read-only"
);
}
}
checkConcurrentWrite
();
checkConcurrentWrite
();
writing
=
true
;
store
.
beforeWrite
();
store
.
beforeWrite
();
writing
=
true
;
}
}
/**
/**
...
...
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
浏览文件 @
f45a31b0
...
@@ -192,7 +192,8 @@ public class MVPrimaryIndex extends BaseIndex {
...
@@ -192,7 +192,8 @@ public class MVPrimaryIndex extends BaseIndex {
@Override
@Override
public
Row
getRow
(
Session
session
,
long
key
)
{
public
Row
getRow
(
Session
session
,
long
key
)
{
TransactionMap
<
Value
,
Value
>
map
=
getMap
(
session
);
TransactionMap
<
Value
,
Value
>
map
=
getMap
(
session
);
ValueArray
array
=
(
ValueArray
)
map
.
get
(
ValueLong
.
get
(
key
));
Value
v
=
map
.
get
(
ValueLong
.
get
(
key
));
ValueArray
array
=
(
ValueArray
)
v
;
Row
row
=
new
Row
(
array
.
getList
(),
0
);
Row
row
=
new
Row
(
array
.
getList
(),
0
);
row
.
setKey
(
key
);
row
.
setKey
(
key
);
return
row
;
return
row
;
...
...
h2/src/main/org/h2/mvstore/db/MVSecondaryIndex.java
浏览文件 @
f45a31b0
...
@@ -97,7 +97,7 @@ public class MVSecondaryIndex extends BaseIndex {
...
@@ -97,7 +97,7 @@ public class MVSecondaryIndex extends BaseIndex {
TransactionMap
<
Value
,
Value
>
map
=
getMap
(
session
);
TransactionMap
<
Value
,
Value
>
map
=
getMap
(
session
);
ValueArray
array
=
getKey
(
row
);
ValueArray
array
=
getKey
(
row
);
if
(
indexType
.
isUnique
())
{
if
(
indexType
.
isUnique
())
{
array
.
getList
()[
keyColumns
-
1
]
=
ValueLong
.
get
(
0
);
array
.
getList
()[
keyColumns
-
1
]
=
ValueLong
.
get
(
Long
.
MIN_VALUE
);
ValueArray
key
=
(
ValueArray
)
map
.
ceilingKey
(
array
);
ValueArray
key
=
(
ValueArray
)
map
.
ceilingKey
(
array
);
if
(
key
!=
null
)
{
if
(
key
!=
null
)
{
SearchRow
r2
=
getRow
(
key
.
getList
());
SearchRow
r2
=
getRow
(
key
.
getList
());
...
@@ -125,7 +125,10 @@ public class MVSecondaryIndex extends BaseIndex {
...
@@ -125,7 +125,10 @@ public class MVSecondaryIndex extends BaseIndex {
@Override
@Override
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
{
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
{
Value
min
=
getKey
(
first
);
ValueArray
min
=
getKey
(
first
);
if
(
min
!=
null
)
{
min
.
getList
()[
keyColumns
-
1
]
=
ValueLong
.
get
(
Long
.
MIN_VALUE
);
}
TransactionMap
<
Value
,
Value
>
map
=
getMap
(
session
);
TransactionMap
<
Value
,
Value
>
map
=
getMap
(
session
);
return
new
MVStoreCursor
(
session
,
map
.
keyIterator
(
min
),
last
);
return
new
MVStoreCursor
(
session
,
map
.
keyIterator
(
min
),
last
);
}
}
...
...
h2/src/main/org/h2/mvstore/db/TransactionStore.java
浏览文件 @
f45a31b0
...
@@ -373,11 +373,6 @@ public class TransactionStore {
...
@@ -373,11 +373,6 @@ public class TransactionStore {
*/
*/
final
TransactionStore
store
;
final
TransactionStore
store
;
/**
* The version of the store at the time the transaction was started.
*/
final
long
startVersion
;
/**
/**
* The transaction id.
* The transaction id.
*/
*/
...
@@ -394,7 +389,6 @@ public class TransactionStore {
...
@@ -394,7 +389,6 @@ public class TransactionStore {
Transaction
(
TransactionStore
store
,
long
transactionId
,
int
status
,
String
name
,
long
logId
)
{
Transaction
(
TransactionStore
store
,
long
transactionId
,
int
status
,
String
name
,
long
logId
)
{
this
.
store
=
store
;
this
.
store
=
store
;
this
.
startVersion
=
store
.
store
.
getCurrentVersion
();
this
.
transactionId
=
transactionId
;
this
.
transactionId
=
transactionId
;
this
.
status
=
status
;
this
.
status
=
status
;
this
.
name
=
name
;
this
.
name
=
name
;
...
@@ -1091,7 +1085,13 @@ public class TransactionStore {
...
@@ -1091,7 +1085,13 @@ public class TransactionStore {
VersionedValue
v
=
(
VersionedValue
)
obj
;
VersionedValue
v
=
(
VersionedValue
)
obj
;
DataUtils
.
writeVarLong
(
buff
,
v
.
transactionId
);
DataUtils
.
writeVarLong
(
buff
,
v
.
transactionId
);
DataUtils
.
writeVarLong
(
buff
,
v
.
logId
);
DataUtils
.
writeVarLong
(
buff
,
v
.
logId
);
return
valueType
.
write
(
buff
,
v
.
value
);
if
(
v
.
value
==
null
)
{
buff
.
put
((
byte
)
0
);
}
else
{
buff
.
put
((
byte
)
1
);
buff
=
valueType
.
write
(
buff
,
v
.
value
);
}
return
buff
;
}
}
@Override
@Override
...
@@ -1099,7 +1099,9 @@ public class TransactionStore {
...
@@ -1099,7 +1099,9 @@ public class TransactionStore {
VersionedValue
v
=
new
VersionedValue
();
VersionedValue
v
=
new
VersionedValue
();
v
.
transactionId
=
DataUtils
.
readVarLong
(
buff
);
v
.
transactionId
=
DataUtils
.
readVarLong
(
buff
);
v
.
logId
=
DataUtils
.
readVarLong
(
buff
);
v
.
logId
=
DataUtils
.
readVarLong
(
buff
);
if
(
buff
.
get
()
==
1
)
{
v
.
value
=
valueType
.
read
(
buff
);
v
.
value
=
valueType
.
read
(
buff
);
}
return
v
;
return
v
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论