Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
922ec1d9
提交
922ec1d9
authored
15 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
typo
上级
b46ebd09
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
15 行增加
和
15 行删除
+15
-15
BtreeIndex.java
h2/src/main/org/h2/index/BtreeIndex.java
+2
-2
BtreeLeaf.java
h2/src/main/org/h2/index/BtreeLeaf.java
+2
-2
BtreeNode.java
h2/src/main/org/h2/index/BtreeNode.java
+1
-1
BtreePage.java
h2/src/main/org/h2/index/BtreePage.java
+1
-1
Page.java
h2/src/main/org/h2/index/Page.java
+2
-2
PageBtreeCursor.java
h2/src/main/org/h2/index/PageBtreeCursor.java
+1
-1
PageBtreeLeaf.java
h2/src/main/org/h2/index/PageBtreeLeaf.java
+1
-1
PageBtreeNode.java
h2/src/main/org/h2/index/PageBtreeNode.java
+3
-3
PageDataNode.java
h2/src/main/org/h2/index/PageDataNode.java
+1
-1
PageStore.java
h2/src/main/org/h2/store/PageStore.java
+1
-1
没有找到文件。
h2/src/main/org/h2/index/BtreeIndex.java
浏览文件 @
922ec1d9
...
...
@@ -27,7 +27,7 @@ import org.h2.value.Value;
import
org.h2.value.ValueNull
;
/**
* This is the most common type of index, a btree index.
* This is the most common type of index, a b
-
tree index.
* The index structure is:
* <ul>
* <li>There is one {@link BtreeHead} that points to the root page.
...
...
@@ -44,7 +44,7 @@ import org.h2.value.ValueNull;
*/
public
class
BtreeIndex
extends
BaseIndex
implements
RecordReader
{
// TODO index / btree: tune page size
// TODO index / b
-
tree: tune page size
// final static int MAX_PAGE_SIZE = 256;
private
Storage
storage
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/BtreeLeaf.java
浏览文件 @
922ec1d9
...
...
@@ -20,7 +20,7 @@ import org.h2.util.ObjectArray;
import
org.h2.value.Value
;
/**
* An outer page of a btree index.
* An outer page of a b
-
tree index.
*
* Page format:
* <pre>
...
...
@@ -92,7 +92,7 @@ public class BtreeLeaf extends BtreePage {
int
i
=
(
l
+
r
)
>>>
1
;
SearchRow
row
=
pageData
.
get
(
i
);
if
(
SysProperties
.
CHECK
&&
row
==
null
)
{
Message
.
throwInternalError
(
"btree corrupt"
);
Message
.
throwInternalError
(
"b
-
tree corrupt"
);
}
int
comp
=
index
.
compareRows
(
row
,
oldRow
);
if
(
comp
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/BtreeNode.java
浏览文件 @
922ec1d9
...
...
@@ -135,7 +135,7 @@ public class BtreeNode extends BtreePage {
}
}
int
at
=
l
;
// merge is not implemented to allow concurrent usage
of btrees
// merge is not implemented to allow concurrent usage
BtreePage
page
=
index
.
getPage
(
session
,
pageChildren
.
get
(
at
));
SearchRow
first
=
page
.
remove
(
session
,
oldRow
);
if
(
first
==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/BtreePage.java
浏览文件 @
922ec1d9
...
...
@@ -33,7 +33,7 @@ public abstract class BtreePage extends Record {
*/
protected
BtreeIndex
index
;
// TODO memory: the btree page needs a lot of memory (in the cache) -
// TODO memory: the b
-
tree page needs a lot of memory (in the cache) -
// probably better not use ObjectArray but array
/**
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/Page.java
浏览文件 @
922ec1d9
...
...
@@ -37,12 +37,12 @@ public class Page {
public
static
final
int
TYPE_DATA_OVERFLOW
=
3
;
/**
* A btree leaf page (without overflow: + FLAG_LAST).
* A b
-
tree leaf page (without overflow: + FLAG_LAST).
*/
public
static
final
int
TYPE_BTREE_LEAF
=
4
;
/**
* A btree node page (never has overflow pages).
* A b
-
tree node page (never has overflow pages).
*/
public
static
final
int
TYPE_BTREE_NODE
=
5
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageBtreeCursor.java
浏览文件 @
922ec1d9
...
...
@@ -12,7 +12,7 @@ import org.h2.result.Row;
import
org.h2.result.SearchRow
;
/**
* The cursor implementation for the page btree index.
* The cursor implementation for the page b
-
tree index.
*/
public
class
PageBtreeCursor
implements
Cursor
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageBtreeLeaf.java
浏览文件 @
922ec1d9
...
...
@@ -259,7 +259,7 @@ class PageBtreeLeaf extends PageBtree {
}
public
String
toString
()
{
return
"page["
+
getPos
()
+
"] btree leaf table:"
+
index
.
getId
()
+
" entries:"
+
entryCount
;
return
"page["
+
getPos
()
+
"] b
-
tree leaf table:"
+
index
.
getId
()
+
" entries:"
+
entryCount
;
}
}
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageBtreeNode.java
浏览文件 @
922ec1d9
...
...
@@ -360,7 +360,7 @@ class PageBtreeNode extends PageBtree {
* Set the cursor to the first row of the next page.
*
* @param cursor the cursor
* @param
row
the current row
* @param
ROW
the current row
*/
void
nextPage
(
PageBtreeCursor
cursor
,
int
pageId
)
throws
SQLException
{
int
i
;
...
...
@@ -389,7 +389,7 @@ class PageBtreeNode extends PageBtree {
* Set the cursor to the last row of the previous page.
*
* @param cursor the cursor
* @param
row
the current row
* @param
ROW
the current row
*/
void
previousPage
(
PageBtreeCursor
cursor
,
int
pageId
)
throws
SQLException
{
int
i
;
...
...
@@ -416,7 +416,7 @@ class PageBtreeNode extends PageBtree {
public
String
toString
()
{
return
"page["
+
getPos
()
+
"] btree node table:"
+
index
.
getId
()
+
" entries:"
+
entryCount
;
return
"page["
+
getPos
()
+
"] b
-
tree node table:"
+
index
.
getId
()
+
" entries:"
+
entryCount
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageDataNode.java
浏览文件 @
922ec1d9
...
...
@@ -185,7 +185,7 @@ class PageDataNode extends PageData {
boolean
remove
(
int
key
)
throws
SQLException
{
int
at
=
find
(
key
);
// merge is not implemented to allow concurrent usage
of btrees
// merge is not implemented to allow concurrent usage
// TODO maybe implement merge
PageData
page
=
index
.
getPage
(
childPageIds
[
at
],
getPos
());
boolean
empty
=
page
.
remove
(
key
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/PageStore.java
浏览文件 @
922ec1d9
...
...
@@ -72,7 +72,7 @@ public class PageStore implements CacheWriter {
// TODO var int: see google protocol buffers
// TODO don't save parent (only root); remove setPageId
// TODO implement checksum - 0 for empty
// TODO btree index with fixed size values doesn't need offset and so on
// TODO b
-
tree index with fixed size values doesn't need offset and so on
// TODO remove parent, use tableId if required
// TODO replace CRC32
// TODO PageBtreeNode: 4 bytes offset - others use only 2
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论