Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
7513daad
提交
7513daad
authored
15 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused code
上级
73112de8
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
2 行增加
和
38 行删除
+2
-38
BtreeLeaf.java
h2/src/main/org/h2/index/BtreeLeaf.java
+0
-19
BtreeNode.java
h2/src/main/org/h2/index/BtreeNode.java
+0
-17
HashIndex.java
h2/src/main/org/h2/index/HashIndex.java
+1
-1
TreeIndex.java
h2/src/main/org/h2/index/TreeIndex.java
+1
-1
没有找到文件。
h2/src/main/org/h2/index/BtreeLeaf.java
浏览文件 @
7513daad
...
...
@@ -7,10 +7,8 @@
package
org
.
h2
.
index
;
import
java.sql.SQLException
;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Session
;
import
org.h2.message.Message
;
import
org.h2.result.Row
;
...
...
@@ -90,11 +88,6 @@ public class BtreeLeaf extends BtreePage {
SearchRow
remove
(
Session
session
,
Row
oldRow
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(
r
==
0
)
{
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
}
while
(
l
<
r
)
{
int
i
=
(
l
+
r
)
>>>
1
;
SearchRow
row
=
pageData
.
get
(
i
);
...
...
@@ -148,9 +141,6 @@ public class BtreeLeaf extends BtreePage {
boolean
findFirst
(
BtreeCursor
cursor
,
SearchRow
compare
,
boolean
bigger
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(
r
==
0
&&
!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
while
(
l
<
r
)
{
int
i
=
(
l
+
r
)
>>>
1
;
SearchRow
row
=
pageData
.
get
(
i
);
...
...
@@ -196,9 +186,6 @@ public class BtreeLeaf extends BtreePage {
void
first
(
BtreeCursor
cursor
)
throws
SQLException
{
if
(
pageData
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
nextUpper
(
cursor
);
return
;
}
...
...
@@ -210,9 +197,6 @@ public class BtreeLeaf extends BtreePage {
void
last
(
BtreeCursor
cursor
)
throws
SQLException
{
int
last
=
pageData
.
size
()
-
1
;
if
(
last
<
0
)
{
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
previousUpper
(
cursor
);
return
;
}
...
...
@@ -298,9 +282,6 @@ public class BtreeLeaf extends BtreePage {
SearchRow
getFirst
(
Session
session
)
{
if
(
pageData
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
return
null
;
}
return
pageData
.
get
(
0
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/BtreeNode.java
浏览文件 @
7513daad
...
...
@@ -7,9 +7,7 @@
package
org
.
h2
.
index
;
import
java.sql.SQLException
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Session
;
import
org.h2.message.Message
;
import
org.h2.result.Row
;
...
...
@@ -75,9 +73,6 @@ public class BtreeNode extends BtreePage {
int
add
(
Row
newRow
,
Session
session
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
&&
pageChildren
.
size
()
==
0
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
while
(
l
<
r
)
{
int
i
=
(
l
+
r
)
>>>
1
;
SearchRow
row
=
getData
(
i
);
...
...
@@ -125,9 +120,6 @@ public class BtreeNode extends BtreePage {
SearchRow
remove
(
Session
session
,
Row
oldRow
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
&&
pageChildren
.
size
()
==
0
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
int
comp
=
0
;
while
(
l
<
r
)
{
int
i
=
(
l
+
r
)
>>>
1
;
...
...
@@ -221,9 +213,6 @@ public class BtreeNode extends BtreePage {
boolean
findFirst
(
BtreeCursor
cursor
,
SearchRow
compare
,
boolean
bigger
)
throws
SQLException
{
int
l
=
0
,
r
=
pageData
.
size
();
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
&&
pageChildren
.
size
()
==
0
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
while
(
l
<
r
)
{
int
i
=
(
l
+
r
)
>>>
1
;
SearchRow
row
=
getData
(
i
);
...
...
@@ -319,9 +308,6 @@ public class BtreeNode extends BtreePage {
void
first
(
BtreeCursor
cursor
)
throws
SQLException
{
if
(
pageChildren
.
size
()
==
0
)
{
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
nextUpper
(
cursor
);
return
;
}
...
...
@@ -333,9 +319,6 @@ public class BtreeNode extends BtreePage {
void
last
(
BtreeCursor
cursor
)
throws
SQLException
{
int
last
=
pageChildren
.
size
()
-
1
;
if
(
last
<
0
)
{
if
(!
Constants
.
ALLOW_EMPTY_BTREE_PAGES
&&
!
root
)
{
Message
.
throwInternalError
(
"Empty btree page"
);
}
previousUpper
(
cursor
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/HashIndex.java
浏览文件 @
7513daad
...
...
@@ -100,7 +100,7 @@ public class HashIndex extends BaseIndex {
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
throws
SQLException
{
if
(
first
==
null
||
last
==
null
)
{
// TODO hash index: should additionally check if values are the same
Message
.
throwInternalError
();
throw
Message
.
throwInternalError
();
}
Row
result
;
if
(
intMap
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/TreeIndex.java
浏览文件 @
7513daad
...
...
@@ -139,7 +139,7 @@ public class TreeIndex extends BaseIndex {
public
void
remove
(
Session
session
,
Row
row
)
throws
SQLException
{
TreeNode
x
=
findFirstNode
(
row
,
true
);
if
(
x
==
null
)
{
Message
.
throwInternalError
(
"not found!"
);
throw
Message
.
throwInternalError
(
"not found!"
);
}
TreeNode
n
;
if
(
x
.
left
==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论