Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
99186183
提交
99186183
authored
15 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New experimental page store.
上级
b52e1a19
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
31 行增加
和
14 行删除
+31
-14
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
ConnectionInfo.java
h2/src/main/org/h2/engine/ConnectionInfo.java
+9
-3
Database.java
h2/src/main/org/h2/engine/Database.java
+11
-7
Engine.java
h2/src/main/org/h2/engine/Engine.java
+1
-1
Backup.java
h2/src/main/org/h2/tools/Backup.java
+9
-2
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
99186183
...
...
@@ -18,7 +18,7 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
-
<ul><li>
Bugfixes in the new storage mechanism (page store).
</li></ul>
<h2>
Version 1.1.115 (2009-06-21)
</h2>
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/engine/ConnectionInfo.java
浏览文件 @
99186183
...
...
@@ -320,12 +320,18 @@ public class ConnectionInfo implements Cloneable {
*/
String
getName
()
throws
SQLException
{
if
(
persistent
)
{
String
n
=
FileUtils
.
normalize
(
name
+
Constants
.
SUFFIX_DATA_FILE
);
String
suffix
;
if
(
SysProperties
.
PAGE_STORE
)
{
suffix
=
Constants
.
SUFFIX_PAGE_FILE
;
}
else
{
suffix
=
Constants
.
SUFFIX_DATA_FILE
;
}
String
n
=
FileUtils
.
normalize
(
name
+
suffix
);
String
fileName
=
FileUtils
.
getFileName
(
n
);
if
(
fileName
.
length
()
<
Constants
.
SUFFIX_DATA_FILE
.
length
()
+
1
)
{
if
(
fileName
.
length
()
<
suffix
.
length
()
+
1
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
INVALID_DATABASE_NAME_1
,
name
);
}
n
=
n
.
substring
(
0
,
n
.
length
()
-
Constants
.
SUFFIX_DATA_FILE
.
length
());
n
=
n
.
substring
(
0
,
n
.
length
()
-
suffix
.
length
());
return
FileUtils
.
normalize
(
n
);
}
return
name
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/engine/Database.java
浏览文件 @
99186183
...
...
@@ -531,16 +531,20 @@ public class Database implements DataHandler {
private
synchronized
void
open
(
int
traceLevelFile
,
int
traceLevelSystemOut
)
throws
SQLException
{
if
(
persistent
)
{
boolean
exists
;
if
(
SysProperties
.
PAGE_STORE
)
{
String
pageFileName
=
databaseName
+
Constants
.
SUFFIX_PAGE_FILE
;
if
(
FileUtils
.
exists
(
pageFileName
)
&&
FileUtils
.
isReadOnly
(
pageFileName
))
{
exists
=
FileUtils
.
exists
(
pageFileName
);
if
(
exists
&&
FileUtils
.
isReadOnly
(
pageFileName
))
{
readOnly
=
true
;
}
}
String
dataFileName
=
databaseName
+
Constants
.
SUFFIX_DATA_FILE
;
if
(
FileUtils
.
exists
(
dataFileName
))
{
// if it is already read-only because ACCESS_MODE_DATA=r
readOnly
=
readOnly
|
FileUtils
.
isReadOnly
(
dataFileName
);
}
else
{
String
dataFileName
=
databaseName
+
Constants
.
SUFFIX_DATA_FILE
;
exists
=
FileUtils
.
exists
(
dataFileName
);
if
(
FileUtils
.
exists
(
dataFileName
))
{
// if it is already read-only because ACCESS_MODE_DATA=r
readOnly
=
readOnly
|
FileUtils
.
isReadOnly
(
dataFileName
);
}
}
if
(
readOnly
)
{
traceSystem
=
new
TraceSystem
(
null
,
false
);
...
...
@@ -573,7 +577,7 @@ public class Database implements DataHandler {
getPageStore
();
starting
=
false
;
}
if
(
FileUtils
.
exists
(
dataFileName
)
)
{
if
(
exists
)
{
lobFilesInDirectories
&=
!
ValueLob
.
existsLobFile
(
getDatabasePath
());
lobFilesInDirectories
|=
FileUtils
.
exists
(
databaseName
+
Constants
.
SUFFIX_LOBS_DIRECTORY
);
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/engine/Engine.java
浏览文件 @
99186183
...
...
@@ -114,7 +114,7 @@ public class Engine {
try
{
backup
=
(
ConnectionInfo
)
ci
.
clone
();
}
catch
(
CloneNotSupportedException
e
)
{
// ignore (can not occur)
throw
Message
.
getInternalError
(
"clone failed"
,
e
);
}
}
Session
session
=
openSession
(
ci
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/tools/Backup.java
浏览文件 @
99186183
...
...
@@ -16,6 +16,7 @@ import java.util.zip.ZipEntry;
import
java.util.zip.ZipOutputStream
;
import
org.h2.command.dml.BackupCommand
;
import
org.h2.constant.SysProperties
;
import
org.h2.engine.Constants
;
import
org.h2.message.Message
;
import
org.h2.store.FileLister
;
...
...
@@ -107,8 +108,14 @@ public class Backup extends Tool {
ZipOutputStream
zipOut
=
new
ZipOutputStream
(
fileOut
);
String
base
=
""
;
for
(
String
fileName
:
list
)
{
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_DATA_FILE
))
{
base
=
FileUtils
.
getParent
(
fileName
);
if
(
SysProperties
.
PAGE_STORE
)
{
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_PAGE_FILE
))
{
base
=
FileUtils
.
getParent
(
fileName
);
}
}
else
{
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_DATA_FILE
))
{
base
=
FileUtils
.
getParent
(
fileName
);
}
}
}
for
(
String
fileName
:
list
)
{
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论