Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
a8817d0e
提交
a8817d0e
authored
9月 28, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Page store improvements.
上级
f90c7a7f
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
49 行增加
和
16 行删除
+49
-16
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-0
PageBtreeLeaf.java
h2/src/main/org/h2/index/PageBtreeLeaf.java
+1
-0
PageBtreeNode.java
h2/src/main/org/h2/index/PageBtreeNode.java
+1
-0
PageData.java
h2/src/main/org/h2/index/PageData.java
+8
-2
PageDataLeaf.java
h2/src/main/org/h2/index/PageDataLeaf.java
+21
-8
PageDataNode.java
h2/src/main/org/h2/index/PageDataNode.java
+14
-1
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-3
TestOpenClose.java
h2/src/test/org/h2/test/db/TestOpenClose.java
+1
-1
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
a8817d0e
...
...
@@ -19,7 +19,7 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Possibility to set a vendor id in Constants.java, so that unofficial builds are distinguishable
from official releases
from official releases
.
</li></ul>
<h2>
Version 1.1.119 (2009-09-26)
</h2>
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
a8817d0e
...
...
@@ -459,6 +459,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Improve concurrency for in-memory database operations.
</li><li>
Issue 122: Support for connection aliases for remote tcp connections.
</li><li>
Fast scrambling (strong encryption doesn't help if the password is included in the application).
</li><li>
Faster startup if there is a large number of LOB files.
</li></ul>
<h2>
Not Planned
</h2>
...
...
h2/src/main/org/h2/index/PageBtreeLeaf.java
浏览文件 @
a8817d0e
...
...
@@ -86,6 +86,7 @@ public class PageBtreeLeaf extends PageBtree {
offsets
[
i
]
=
data
.
readShortInt
();
}
start
=
data
.
length
();
written
=
true
;
}
int
addRowTry
(
SearchRow
row
)
throws
SQLException
{
...
...
h2/src/main/org/h2/index/PageBtreeNode.java
浏览文件 @
a8817d0e
...
...
@@ -107,6 +107,7 @@ public class PageBtreeNode extends PageBtree {
}
check
();
start
=
data
.
length
();
written
=
true
;
}
/**
...
...
h2/src/main/org/h2/index/PageData.java
浏览文件 @
a8817d0e
...
...
@@ -17,6 +17,11 @@ import org.h2.store.Page;
*/
abstract
class
PageData
extends
Page
{
/**
* The position of the parent page id.
*/
static
final
int
START_PARENT
=
3
;
/**
* This is a root page.
*/
...
...
@@ -143,7 +148,6 @@ abstract class PageData extends Page {
* @param id the new page id
*/
void
setPageId
(
int
id
)
throws
SQLException
{
written
=
false
;
index
.
getPageStore
().
removeRecord
(
getPos
());
setPos
(
id
);
remapChildren
();
...
...
@@ -169,8 +173,10 @@ abstract class PageData extends Page {
* @param id the new parent page id
*/
void
setParentPageId
(
int
id
)
{
written
=
false
;
parentPageId
=
id
;
if
(
written
)
{
data
.
setInt
(
START_PARENT
,
parentPageId
);
}
}
/**
...
...
h2/src/main/org/h2/index/PageDataLeaf.java
浏览文件 @
a8817d0e
...
...
@@ -10,6 +10,7 @@ import java.lang.ref.SoftReference;
import
java.sql.SQLException
;
import
java.util.Arrays
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Session
;
import
org.h2.message.Message
;
import
org.h2.result.Row
;
...
...
@@ -34,11 +35,6 @@ import org.h2.store.PageStore;
*/
public
class
PageDataLeaf
extends
PageData
{
/**
* The start of the data in the last overflow page.
*/
static
final
int
START_PARENT
=
3
;
/**
* The row offsets.
*/
...
...
@@ -132,6 +128,7 @@ public class PageDataLeaf extends PageData {
offsets
[
i
]
=
data
.
readShortInt
();
}
start
=
data
.
length
();
written
=
true
;
}
private
int
getRowLength
(
Row
row
)
throws
SQLException
{
...
...
@@ -423,6 +420,7 @@ public class PageDataLeaf extends PageData {
}
private
void
writeHead
()
{
data
.
reset
();
int
type
;
if
(
firstOverflowPageId
==
0
)
{
type
=
Page
.
TYPE_DATA_LEAF
|
Page
.
FLAG_LAST
;
...
...
@@ -431,6 +429,11 @@ public class PageDataLeaf extends PageData {
}
data
.
writeByte
((
byte
)
type
);
data
.
writeShortInt
(
0
);
if
(
SysProperties
.
CHECK2
)
{
if
(
data
.
length
()
!=
START_PARENT
)
{
Message
.
throwInternalError
();
}
}
data
.
writeInt
(
parentPageId
);
data
.
writeVarInt
(
index
.
getId
());
data
.
writeVarInt
(
columnCount
);
...
...
@@ -441,8 +444,10 @@ public class PageDataLeaf extends PageData {
if
(
written
)
{
return
;
}
if
(
SysProperties
.
CHECK
&&
firstOverflowPageId
!=
0
&&
rows
[
0
]
==
null
)
{
Message
.
throwInternalError
(
toString
());
}
readAllRows
();
data
.
reset
();
writeHead
();
if
(
firstOverflowPageId
!=
0
)
{
data
.
writeInt
(
firstOverflowPageId
);
...
...
@@ -478,12 +483,17 @@ public class PageDataLeaf extends PageData {
p2
.
firstOverflowPageId
=
firstOverflowPageId
;
p2
.
rowRef
=
rowRef
;
p2
.
rows
=
rows
;
if
(
firstOverflowPageId
!=
0
)
{
p2
.
rows
[
0
]
=
getRowAt
(
0
);
}
p2
.
entryCount
=
entryCount
;
p2
.
offsets
=
offsets
;
p2
.
parentPageId
=
parentPageId
;
p2
.
start
=
start
;
store
.
updateRecord
(
p2
,
false
,
null
);
p2
.
remapChildren
();
p2
.
write
();
p2
.
data
.
truncate
(
index
.
getPageStore
().
getPageSize
());
store
.
freePage
(
getPos
(),
true
,
data
);
if
(
parentPageId
==
ROOT
)
{
index
.
setRootPageId
(
session
,
newPos
);
...
...
@@ -494,8 +504,11 @@ public class PageDataLeaf extends PageData {
}
void
setOverflow
(
int
overflow
)
throws
SQLException
{
written
=
false
;
this
.
firstOverflowPageId
=
overflow
;
firstOverflowPageId
=
overflow
;
if
(
written
)
{
writeHead
();
data
.
writeInt
(
firstOverflowPageId
);
}
index
.
getPageStore
().
updateRecord
(
this
,
true
,
data
);
}
...
...
h2/src/main/org/h2/index/PageDataNode.java
浏览文件 @
a8817d0e
...
...
@@ -9,6 +9,7 @@ package org.h2.index;
import
java.sql.SQLException
;
import
java.util.Arrays
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Session
;
import
org.h2.message.Message
;
import
org.h2.result.Row
;
...
...
@@ -106,6 +107,7 @@ public class PageDataNode extends PageData {
}
length
=
data
.
length
();
check
();
written
=
true
;
}
private
void
addChild
(
int
x
,
int
childPageId
,
long
key
)
{
...
...
@@ -159,6 +161,9 @@ public class PageDataNode extends PageData {
}
if
(
rowCountStored
!=
UNKNOWN_ROWCOUNT
)
{
rowCountStored
=
UNKNOWN_ROWCOUNT
;
if
(
written
)
{
writeHead
();
}
index
.
getPageStore
().
updateRecord
(
this
,
true
,
data
);
}
}
...
...
@@ -292,6 +297,9 @@ public class PageDataNode extends PageData {
this
.
rowCount
=
rowCount
;
if
(
rowCountStored
!=
rowCount
)
{
rowCountStored
=
rowCount
;
if
(
written
)
{
writeHead
();
}
index
.
getPageStore
().
updateRecord
(
this
,
true
,
data
);
}
}
...
...
@@ -314,8 +322,14 @@ public class PageDataNode extends PageData {
}
private
void
writeHead
()
{
data
.
reset
();
data
.
writeByte
((
byte
)
Page
.
TYPE_DATA_NODE
);
data
.
writeShortInt
(
0
);
if
(
SysProperties
.
CHECK2
)
{
if
(
data
.
length
()
!=
START_PARENT
)
{
Message
.
throwInternalError
();
}
}
data
.
writeInt
(
parentPageId
);
data
.
writeVarInt
(
index
.
getId
());
data
.
writeInt
(
rowCountStored
);
...
...
@@ -327,7 +341,6 @@ public class PageDataNode extends PageData {
return
;
}
check
();
data
.
reset
();
writeHead
();
data
.
writeInt
(
childPageIds
[
entryCount
]);
for
(
int
i
=
0
;
i
<
entryCount
;
i
++)
{
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
a8817d0e
...
...
@@ -292,8 +292,6 @@ java org.h2.test.TestAll timer
/*
slow startup with a large number of lob files
mvcc merge problem
System.setProperty("h2.optimizeInList", "true");
...
...
@@ -307,7 +305,7 @@ out of memory in tests: analyze heap dump
-------------
create a short documentation
integrate the short documentation, but where?
documentation: rolling review at roadmap.html: done
...
...
h2/src/test/org/h2/test/db/TestOpenClose.java
浏览文件 @
a8817d0e
...
...
@@ -136,7 +136,7 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener {
conn
.
createStatement
().
execute
(
"drop table employee if exists"
);
conn
.
createStatement
().
execute
(
"create table employee(id int primary key, name varchar, salary int)"
);
conn
.
close
();
int
len
=
this
.
getSize
(
200
,
1000
);
int
len
=
getSize
(
200
,
1000
);
Thread
[]
threads
=
new
Thread
[
len
];
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
threads
[
i
]
=
new
Thread
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论