Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
a9115701
提交
a9115701
authored
11 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MVTableEngine
上级
4c470ed9
master
noel-pr1
plus33-master
pr/267
stumc-Issue#576
version-1.4.198
version-1.4.197
version-1.4.196
version-1.4.195
version-1.4.194
version-1.4.193
version-1.4.192
version-1.4.191
version-1.4.190
version-1.4.188
version-1.4.187
version-1.4.186
version-1.4.185
version-1.4.184
version-1.4.183
version-1.4.182
version-1.4.181
version-1.4.178
version-1.4.177
version-1.3
无相关合并请求
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
11 行增加
和
6 行删除
+11
-6
RecoverTester.java
h2/src/main/org/h2/store/RecoverTester.java
+5
-0
Recover.java
h2/src/main/org/h2/tools/Recover.java
+4
-4
TestMVTableEngine.java
h2/src/test/org/h2/test/store/TestMVTableEngine.java
+2
-2
没有找到文件。
h2/src/main/org/h2/store/RecoverTester.java
浏览文件 @
a9115701
...
@@ -102,6 +102,11 @@ public class RecoverTester implements Recorder {
...
@@ -102,6 +102,11 @@ public class RecoverTester implements Recorder {
out
.
println
(
"+ write #"
+
writeCount
+
" verify #"
+
verifyCount
);
out
.
println
(
"+ write #"
+
writeCount
+
" verify #"
+
verifyCount
);
try
{
try
{
IOUtils
.
copyFiles
(
fileName
,
testDatabase
+
Constants
.
SUFFIX_PAGE_FILE
);
IOUtils
.
copyFiles
(
fileName
,
testDatabase
+
Constants
.
SUFFIX_PAGE_FILE
);
String
mvFileName
=
fileName
.
substring
(
0
,
fileName
.
length
()
-
Constants
.
SUFFIX_PAGE_FILE
.
length
())
+
Constants
.
SUFFIX_MV_FILE
;
if
(
FileUtils
.
exists
(
mvFileName
))
{
IOUtils
.
copyFiles
(
mvFileName
,
testDatabase
+
Constants
.
SUFFIX_MV_FILE
);
}
verifyCount
++;
verifyCount
++;
// avoid using the Engine class to avoid deadlocks
// avoid using the Engine class to avoid deadlocks
Properties
p
=
new
Properties
();
Properties
p
=
new
Properties
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/tools/Recover.java
浏览文件 @
a9115701
...
@@ -250,7 +250,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -250,7 +250,7 @@ public class Recover extends Tool implements DataHandler {
}
}
for
(
String
fileName
:
list
)
{
for
(
String
fileName
:
list
)
{
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_PAGE_FILE
))
{
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_PAGE_FILE
))
{
String
mvFile
=
fileName
.
substring
(
0
,
fileName
.
length
()
-
String
mvFile
=
fileName
.
substring
(
0
,
fileName
.
length
()
-
Constants
.
SUFFIX_PAGE_FILE
.
length
())
+
Constants
.
SUFFIX_MV_FILE
;
Constants
.
SUFFIX_PAGE_FILE
.
length
())
+
Constants
.
SUFFIX_MV_FILE
;
if
(
list
.
contains
(
mvFile
))
{
if
(
list
.
contains
(
mvFile
))
{
this
.
mvFile
=
mvFile
;
this
.
mvFile
=
mvFile
;
...
@@ -259,7 +259,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -259,7 +259,7 @@ public class Recover extends Tool implements DataHandler {
}
else
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_LOB_FILE
))
{
}
else
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_LOB_FILE
))
{
dumpLob
(
fileName
,
false
);
dumpLob
(
fileName
,
false
);
}
else
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_MV_FILE
))
{
}
else
if
(
fileName
.
endsWith
(
Constants
.
SUFFIX_MV_FILE
))
{
PrintWriter
writer
=
getWriter
(
fileName
,
".
mv.
txt"
);
PrintWriter
writer
=
getWriter
(
fileName
,
".txt"
);
MVStoreTool
.
dump
(
fileName
,
writer
);
MVStoreTool
.
dump
(
fileName
,
writer
);
writer
.
close
();
writer
.
close
();
}
}
...
@@ -485,7 +485,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -485,7 +485,7 @@ public class Recover extends Tool implements DataHandler {
closeSilently
(
store
);
closeSilently
(
store
);
}
}
}
}
private
void
dumpMVStoreFile
(
PrintWriter
writer
,
String
fileName
)
{
private
void
dumpMVStoreFile
(
PrintWriter
writer
,
String
fileName
)
{
writer
.
println
(
"-- mvstore"
);
writer
.
println
(
"-- mvstore"
);
setDatabaseName
(
fileName
.
substring
(
0
,
fileName
.
length
()
-
Constants
.
SUFFIX_MV_FILE
.
length
()));
setDatabaseName
(
fileName
.
substring
(
0
,
fileName
.
length
()
-
Constants
.
SUFFIX_MV_FILE
.
length
()));
...
@@ -544,7 +544,7 @@ public class Recover extends Tool implements DataHandler {
...
@@ -544,7 +544,7 @@ public class Recover extends Tool implements DataHandler {
}
finally
{
}
finally
{
mv
.
close
();
mv
.
close
();
}
}
}
}
private
static
String
getPageType
(
int
type
)
{
private
static
String
getPageType
(
int
type
)
{
switch
(
type
)
{
switch
(
type
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/store/TestMVTableEngine.java
浏览文件 @
a9115701
...
@@ -116,7 +116,7 @@ int test;
...
@@ -116,7 +116,7 @@ int test;
//System.out.println(prof.getTop(10));
//System.out.println(prof.getTop(10));
System
.
out
.
println
((
System
.
currentTimeMillis
()
-
time
)
+
" "
+
dbName
+
" after"
);
System
.
out
.
println
((
System
.
currentTimeMillis
()
-
time
)
+
" "
+
dbName
+
" after"
);
}
}
private
void
testRecover
()
throws
Exception
{
private
void
testRecover
()
throws
Exception
{
FileUtils
.
deleteRecursive
(
getBaseDir
(),
true
);
FileUtils
.
deleteRecursive
(
getBaseDir
(),
true
);
Connection
conn
;
Connection
conn
;
...
@@ -130,7 +130,7 @@ int test;
...
@@ -130,7 +130,7 @@ int test;
stat
.
execute
(
"create table test2(name varchar)"
);
stat
.
execute
(
"create table test2(name varchar)"
);
stat
.
execute
(
"insert into test2 values('Hello World')"
);
stat
.
execute
(
"insert into test2 values('Hello World')"
);
conn
.
close
();
conn
.
close
();
Recover
.
execute
(
getBaseDir
(),
"mvstore"
);
Recover
.
execute
(
getBaseDir
(),
"mvstore"
);
DeleteDbFiles
.
execute
(
getBaseDir
(),
"mvstore"
,
true
);
DeleteDbFiles
.
execute
(
getBaseDir
(),
"mvstore"
,
true
);
conn
=
getConnection
(
url
);
conn
=
getConnection
(
url
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论