Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
1db91147
提交
1db91147
authored
12 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting
上级
3effa5c1
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
22 行增加
和
13 行删除
+22
-13
ScriptBase.java
h2/src/main/org/h2/command/dml/ScriptBase.java
+6
-1
FunctionIndex.java
h2/src/main/org/h2/index/FunctionIndex.java
+1
-1
Index.java
h2/src/main/org/h2/index/Index.java
+4
-2
MetaIndex.java
h2/src/main/org/h2/index/MetaIndex.java
+1
-1
MultiVersionIndex.java
h2/src/main/org/h2/index/MultiVersionIndex.java
+1
-1
PageBtreeIndex.java
h2/src/main/org/h2/index/PageBtreeIndex.java
+1
-1
PageData.java
h2/src/main/org/h2/index/PageData.java
+4
-2
PageDataIndex.java
h2/src/main/org/h2/index/PageDataIndex.java
+1
-1
PageDataLeaf.java
h2/src/main/org/h2/index/PageDataLeaf.java
+1
-1
PageDelegateIndex.java
h2/src/main/org/h2/index/PageDelegateIndex.java
+1
-1
ScanIndex.java
h2/src/main/org/h2/index/ScanIndex.java
+1
-1
没有找到文件。
h2/src/main/org/h2/command/dml/ScriptBase.java
浏览文件 @
1db91147
...
...
@@ -137,7 +137,12 @@ abstract class ScriptBase extends Prepared implements DataHandler {
// always use a big buffer, otherwise end-of-block is written a lot
out
=
new
BufferedOutputStream
(
out
,
Constants
.
IO_BUFFER_SIZE_COMPRESS
);
}
else
{
OutputStream
o
=
FileUtils
.
newOutputStream
(
file
,
false
);
OutputStream
o
;
try
{
o
=
FileUtils
.
newOutputStream
(
file
,
false
);
}
catch
(
IOException
e
)
{
throw
DbException
.
convertIOException
(
e
,
null
);
}
out
=
new
BufferedOutputStream
(
o
,
Constants
.
IO_BUFFER_SIZE
);
out
=
CompressTool
.
wrapOutputStream
(
out
,
compressionAlgorithm
,
SCRIPT_SQL
);
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/FunctionIndex.java
浏览文件 @
1db91147
...
...
@@ -93,7 +93,7 @@ public class FunctionIndex extends BaseIndex {
public
long
getDiskSpaceUsed
()
{
return
0
;
}
public
String
getPlanSQL
()
{
return
"function"
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/Index.java
浏览文件 @
1db91147
...
...
@@ -157,10 +157,12 @@ public interface Index extends SchemaObject {
long
getRowCountApproximation
();
/**
* @return the estimated number of bytes of disk space used by this page and all child pages.
* Get the used disk space for this index.
*
* @return the estimated number of bytes
*/
long
getDiskSpaceUsed
();
/**
* Compare two rows.
*
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/MetaIndex.java
浏览文件 @
1db91147
...
...
@@ -100,7 +100,7 @@ public class MetaIndex extends BaseIndex {
public
long
getDiskSpaceUsed
()
{
return
meta
.
getDiskSpaceUsed
();
}
public
String
getPlanSQL
()
{
return
"meta"
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/MultiVersionIndex.java
浏览文件 @
1db91147
...
...
@@ -305,7 +305,7 @@ public class MultiVersionIndex implements Index {
public
long
getDiskSpaceUsed
()
{
return
base
.
getDiskSpaceUsed
();
}
public
Index
getBaseIndex
()
{
return
base
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageBtreeIndex.java
浏览文件 @
1db91147
...
...
@@ -303,7 +303,7 @@ public class PageBtreeIndex extends PageIndex {
public
long
getDiskSpaceUsed
()
{
return
tableData
.
getDiskSpaceUsed
();
}
public
long
getRowCount
(
Session
session
)
{
return
rowCount
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageData.java
浏览文件 @
1db91147
...
...
@@ -89,7 +89,9 @@ abstract class PageData extends Page {
abstract
void
setRowCountStored
(
int
rowCount
);
/**
* @return the estimated number of bytes of disk space used by this page and all child pages.
* Get the used disk space for this index.
*
* @return the estimated number of bytes
*/
abstract
long
getDiskSpaceUsed
();
...
...
@@ -234,7 +236,7 @@ abstract class PageData extends Page {
// to how much memory a row needs on average
return
memoryEstimated
;
}
int
getParentPageId
()
{
return
parentPageId
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageDataIndex.java
浏览文件 @
1db91147
...
...
@@ -431,7 +431,7 @@ public class PageDataIndex extends PageIndex {
PageData
root
=
getPage
(
rootPageId
,
0
);
return
root
.
getDiskSpaceUsed
();
}
public
String
getCreateSQL
()
{
return
null
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageDataLeaf.java
浏览文件 @
1db91147
...
...
@@ -454,7 +454,7 @@ public class PageDataLeaf extends PageData {
long
getDiskSpaceUsed
()
{
return
index
.
getPageStore
().
getPageSize
();
}
public
void
write
()
{
writeData
();
index
.
getPageStore
().
writePage
(
getPos
(),
data
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/PageDelegateIndex.java
浏览文件 @
1db91147
...
...
@@ -120,7 +120,7 @@ public class PageDelegateIndex extends PageIndex {
public
long
getDiskSpaceUsed
()
{
return
mainIndex
.
getDiskSpaceUsed
();
}
public
void
writeRowCount
()
{
// ignore
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/index/ScanIndex.java
浏览文件 @
1db91147
...
...
@@ -235,7 +235,7 @@ public class ScanIndex extends BaseIndex {
public
long
getDiskSpaceUsed
()
{
return
0
;
}
public
String
getPlanSQL
()
{
return
table
.
getSQL
()
+
".tableScan"
;
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论