Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
8166e699
提交
8166e699
authored
14 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused code.
上级
2eebcdd2
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
17 行增加
和
32 行删除
+17
-32
PageData.java
h2/src/main/org/h2/index/PageData.java
+3
-4
PageDataIndex.java
h2/src/main/org/h2/index/PageDataIndex.java
+1
-1
PageFreeList.java
h2/src/main/org/h2/store/PageFreeList.java
+0
-19
PageStore.java
h2/src/main/org/h2/store/PageStore.java
+10
-5
CacheLRU.java
h2/src/main/org/h2/util/CacheLRU.java
+0
-2
TestCases.java
h2/src/test/org/h2/test/db/TestCases.java
+3
-1
没有找到文件。
h2/src/main/org/h2/index/PageData.java
浏览文件 @
8166e699
...
...
@@ -234,10 +234,9 @@ abstract class PageData extends Page {
}
public
boolean
canRemove
()
{
int
test
;
// if (changeCount >= index.getPageStore().getChangeCount()) {
// return false;
// }
if
(
changeCount
>=
index
.
getPageStore
().
getChangeCount
())
{
return
false
;
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageDataIndex.java
浏览文件 @
8166e699
...
...
@@ -204,7 +204,7 @@ public class PageDataIndex extends PageIndex {
if
(
p
instanceof
PageDataOverflow
)
{
return
(
PageDataOverflow
)
p
;
}
throw
DbException
.
get
(
ErrorCode
.
FILE_CORRUPTED_1
,
p
.
toString
());
throw
DbException
.
get
(
ErrorCode
.
FILE_CORRUPTED_1
,
p
==
null
?
"null"
:
p
.
toString
());
}
/**
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/PageFreeList.java
浏览文件 @
8166e699
...
...
@@ -155,18 +155,7 @@ public class PageFreeList extends Page {
data
.
readShortInt
();
for
(
int
i
=
0
;
i
<
pageCount
;
i
+=
8
)
{
int
x
=
data
.
readByte
()
&
255
;
int
test
;
used
.
setByte
(
i
,
x
);
// for (int j = 0; j < 8; j++) {
// if ((x & (1 << j)) != 0) {
// if (!used.get(i + j)) {
// System.out.println("??");
// }
// used.set(i + j);
// } else if (used.get(i+j)) {
// System.out.println("??");
// }
// }
}
full
=
false
;
}
...
...
@@ -176,14 +165,6 @@ public class PageFreeList extends Page {
data
.
writeByte
((
byte
)
Page
.
TYPE_FREE_LIST
);
data
.
writeShortInt
(
0
);
for
(
int
i
=
0
;
i
<
pageCount
;
i
+=
8
)
{
int
tst
;
// int x = 0;
// for (int j = 0; j < 8; j++) {
// if (used.get(i + j)) {
// x += 1 << j;
// }
// }
// data.writeByte((byte) x);
data
.
writeByte
((
byte
)
used
.
getByte
(
i
));
}
store
.
writePage
(
getPos
(),
data
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/store/PageStore.java
浏览文件 @
8166e699
...
...
@@ -468,7 +468,7 @@ public class PageStore implements CacheWriter {
boolean
isCompactFully
=
compactMode
==
CommandInterface
.
SHUTDOWN_COMPACT
;
boolean
isDefrag
=
compactMode
==
CommandInterface
.
SHUTDOWN_DEFRAG
;
int
test
;
int
test
WithReopen
;
// isCompactFully = isDefrag = true;
int
maxCompactTime
=
SysProperties
.
MAX_COMPACT_TIME
;
...
...
@@ -492,10 +492,10 @@ public class PageStore implements CacheWriter {
if
(
compact
(
full
,
firstFree
))
{
j
++;
long
now
=
System
.
currentTimeMillis
();
//
if (now > start + maxCompactTime) {
//
j = maxMove;
//
break;
//
}
if
(
now
>
start
+
maxCompactTime
)
{
j
=
maxMove
;
break
;
}
}
}
}
...
...
@@ -1584,6 +1584,11 @@ public class PageStore implements CacheWriter {
metaRootPageId
.
put
(
id
,
rootPageId
);
if
(
type
==
META_TYPE_DATA_INDEX
)
{
CreateTableData
data
=
new
CreateTableData
();
if
(
SysProperties
.
CHECK
)
{
if
(
columns
==
null
)
{
throw
DbException
.
throwInternalError
(
row
.
toString
());
}
}
for
(
int
i
=
0
;
i
<
columns
.
length
;
i
++)
{
Column
col
=
new
Column
(
"C"
+
i
,
Value
.
INT
);
data
.
columns
.
add
(
col
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/util/CacheLRU.java
浏览文件 @
8166e699
...
...
@@ -168,11 +168,9 @@ public class CacheLRU implements Cache {
}
}
if
(
changed
.
size
()
>
0
)
{
int
fixMaybeReplacesChangeCount
;
if
(!
flushed
)
{
writer
.
flushLog
();
}
Collections
.
sort
(
changed
);
int
max
=
maxMemory
;
try
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestCases.java
浏览文件 @
8166e699
...
...
@@ -552,7 +552,9 @@ public class TestCases extends TestBase {
}
time
=
System
.
currentTimeMillis
()
-
time
;
if
(
time
>
5000
)
{
fail
(
"closing took "
+
time
);
if
(!
config
.
record
)
{
fail
(
"closing took "
+
time
);
}
}
deleteDb
(
"cases"
);
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论