Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
1e9832f5
提交
1e9832f5
authored
12 年前
作者:
noelgrandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove some dead fields and variables
上级
de91fc28
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
10 行增加
和
23 行删除
+10
-23
TestDateStorage.java
h2/src/test/org/h2/test/db/TestDateStorage.java
+0
-2
TestMultiDimension.java
h2/src/test/org/h2/test/db/TestMultiDimension.java
+2
-2
TestOpenClose.java
h2/src/test/org/h2/test/db/TestOpenClose.java
+1
-1
TestTableEngines.java
h2/src/test/org/h2/test/db/TestTableEngines.java
+3
-6
TestTwoPhaseCommit.java
h2/src/test/org/h2/test/db/TestTwoPhaseCommit.java
+1
-1
TestPowerOffFs2.java
h2/src/test/org/h2/test/synth/TestPowerOffFs2.java
+0
-3
TestThreads.java
h2/src/test/org/h2/test/synth/TestThreads.java
+1
-1
TestCache.java
h2/src/test/org/h2/test/unit/TestCache.java
+0
-2
TestCompress.java
h2/src/test/org/h2/test/unit/TestCompress.java
+1
-2
Indexer.java
h2/src/tools/org/h2/build/indexer/Indexer.java
+0
-2
ModelUtils.java
h2/src/tools/org/h2/jaqu/ModelUtils.java
+1
-1
没有找到文件。
h2/src/test/org/h2/test/db/TestDateStorage.java
浏览文件 @
1e9832f5
...
...
@@ -153,7 +153,6 @@ public class TestDateStorage extends TestBase {
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6772689
java
.
sql
.
Date
date
=
java
.
sql
.
Date
.
valueOf
(
s
);
long
time
=
date
.
getTime
();
int
plus
=
0
;
while
(
true
)
{
date
=
new
java
.
sql
.
Date
(
time
);
String
x
=
date
.
toString
();
...
...
@@ -161,7 +160,6 @@ public class TestDateStorage extends TestBase {
break
;
}
time
+=
1000
;
plus
+=
1000
;
}
if
(!
date
.
toString
().
equals
(
s
))
{
println
(
TimeZone
.
getDefault
().
getID
()
+
" "
+
s
+
" <> "
+
date
.
toString
());
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestMultiDimension.java
浏览文件 @
1e9832f5
...
...
@@ -128,7 +128,7 @@ public class TestMultiDimension extends TestBase {
long
timeMulti
=
0
,
timeRegular
=
0
;
int
timeMax
=
getSize
(
500
,
2000
);
Random
rand
=
new
Random
(
1
);
for
(
int
i
=
0
;
timeMulti
<
timeMax
;
i
++
)
{
while
(
timeMulti
<
timeMax
)
{
int
size
=
rand
.
nextInt
(
max
/
10
);
int
minX
=
rand
.
nextInt
(
max
-
size
);
int
minY
=
rand
.
nextInt
(
max
-
size
);
...
...
@@ -199,7 +199,7 @@ public class TestMultiDimension extends TestBase {
long
timeMulti
=
0
,
timeRegular
=
0
;
int
timeMax
=
getSize
(
500
,
2000
);
Random
rand
=
new
Random
(
1
);
for
(
int
i
=
0
;
timeMulti
<
timeMax
;
i
++
)
{
while
(
timeMulti
<
timeMax
)
{
int
size
=
rand
.
nextInt
(
max
/
10
);
int
minX
=
rand
.
nextInt
(
max
-
size
);
int
minY
=
rand
.
nextInt
(
max
-
size
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestOpenClose.java
浏览文件 @
1e9832f5
...
...
@@ -85,7 +85,7 @@ public class TestOpenClose extends TestBase implements DatabaseEventListener {
conn
.
close
();
Thread
.
sleep
(
950
);
long
time
=
System
.
currentTimeMillis
();
for
(
int
i
=
0
;
System
.
currentTimeMillis
()
-
time
<
100
;
i
++
)
{
while
(
System
.
currentTimeMillis
()
-
time
<
100
)
{
conn
=
DriverManager
.
getConnection
(
url
,
user
,
password
);
conn
.
close
();
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestTableEngines.java
浏览文件 @
1e9832f5
...
...
@@ -347,23 +347,20 @@ public class TestTableEngines extends TestBase {
}
public
Cursor
find
(
TableFilter
filter
,
SearchRow
first
,
SearchRow
last
)
{
return
find
(
filter
.
get
Session
(),
filter
.
getFilterCondition
(),
first
,
last
);
return
find
(
filter
.
get
FilterCondition
()
);
}
public
Cursor
find
(
Session
session
,
SearchRow
first
,
SearchRow
last
)
{
return
find
(
session
,
null
,
first
,
last
);
return
find
(
null
);
}
/**
* Search within the table.
*
* @param session the session
* @param filter the table filter (optional)
* @param first the first row (optional)
* @param last the last row (optional)
* @return the cursor
*/
private
Cursor
find
(
Session
session
,
Expression
filter
,
SearchRow
first
,
SearchRow
last
)
{
private
Cursor
find
(
Expression
filter
)
{
if
(
filter
!=
null
)
{
row
.
setValue
(
1
,
ValueString
.
get
(
filter
.
getSQL
()));
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestTwoPhaseCommit.java
浏览文件 @
1e9832f5
...
...
@@ -55,7 +55,7 @@ public class TestTwoPhaseCommit extends TestBase {
stat
.
execute
(
"CREATE TABLE TEST2(ID INT)"
);
String
name
=
"tx12345678"
;
try
{
for
(
int
i
=
0
;;
i
++
)
{
while
(
true
)
{
stat
.
execute
(
"INSERT INTO TEST2 VALUES(1)"
);
name
+=
"x"
;
stat
.
execute
(
"PREPARE COMMIT "
+
name
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/synth/TestPowerOffFs2.java
浏览文件 @
1e9832f5
...
...
@@ -31,7 +31,6 @@ public class TestPowerOffFs2 extends TestBase {
private
String
password
=
"sa"
;
private
ArrayList
<
Connection
>
connections
=
New
.
arrayList
();
private
ArrayList
<
String
>
tables
=
New
.
arrayList
();
private
int
openCount
;
/**
* Run just this test.
...
...
@@ -84,7 +83,6 @@ public class TestPowerOffFs2 extends TestBase {
private
void
testCrash
(
int
x
)
throws
SQLException
{
connections
.
clear
();
tables
.
clear
();
openCount
=
0
;
Random
random
=
new
Random
(
x
);
for
(
int
i
=
0
;;
i
++)
{
if
(
i
>
200
&&
connections
.
size
()
>
1
&&
tables
.
size
()
>
1
)
{
...
...
@@ -167,7 +165,6 @@ public class TestPowerOffFs2 extends TestBase {
}
private
Connection
openConnection
()
throws
SQLException
{
openCount
++;
Connection
conn
=
DriverManager
.
getConnection
(
url
,
user
,
password
);
connections
.
add
(
conn
);
return
conn
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/synth/TestThreads.java
浏览文件 @
1e9832f5
...
...
@@ -126,7 +126,7 @@ public class TestThreads extends TestBase implements Runnable {
ResultSet
rs
;
int
max
=
master
.
getMaxId
();
int
rid
=
random
.
nextInt
(
max
);
for
(
int
i
=
0
;
!
master
.
stop
;
i
++
)
{
while
(!
master
.
stop
)
{
switch
(
type
)
{
case
INSERT:
max
=
master
.
incrementMaxId
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestCache.java
浏览文件 @
1e9832f5
...
...
@@ -88,12 +88,10 @@ public class TestCache extends TestBase implements CacheWriter {
int
rc
;
prep
=
conn
.
prepareStatement
(
"select * from test where id = ?"
);
rc
=
getReadCount
(
stat
);
int
p
=
0
;
for
(
int
x
=
0
;
x
<
2
;
x
++)
{
for
(
int
i
=
0
;
i
<
15000
;
i
++)
{
prep
.
setInt
(
1
,
i
);
prep
.
executeQuery
();
p
++;
}
}
int
rcData
=
getReadCount
(
stat
)
-
rc
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestCompress.java
浏览文件 @
1e9832f5
...
...
@@ -159,13 +159,12 @@ public class TestCompress extends TestBase {
long
time
=
System
.
currentTimeMillis
();
for
(
int
i
=
0
;
i
<
1000
;
i
++)
{
InputStream
in
=
FileUtils
.
newInputStream
(
"memFS:compress.h2.db"
);
int
total
=
0
;
while
(
true
)
{
int
len
=
in
.
read
(
buff
);
if
(
len
<
0
)
{
break
;
}
total
+=
compress
.
compress
(
buff
,
pageSize
,
test
,
0
);
compress
.
compress
(
buff
,
pageSize
,
test
,
0
);
}
in
.
close
();
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/indexer/Indexer.java
浏览文件 @
1e9832f5
...
...
@@ -44,7 +44,6 @@ public class Indexer {
private
HashMap
<
String
,
Word
>
words
=
new
HashMap
<
String
,
Word
>();
private
HashSet
<
String
>
noIndex
=
new
HashSet
<
String
>();
private
ArrayList
<
Word
>
wordList
;
private
int
totalAllWeights
;
private
PrintWriter
output
;
private
Page
page
;
private
boolean
title
;
...
...
@@ -350,7 +349,6 @@ public class Indexer {
word
.
name
=
token
.
compareTo
(
word
.
name
)
>
0
?
token
:
word
.
name
;
}
page
.
totalWeight
+=
weight
;
totalAllWeights
+=
weight
;
word
.
addPage
(
page
,
weight
);
}
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/jaqu/ModelUtils.java
浏览文件 @
1e9832f5
...
...
@@ -298,7 +298,7 @@ public class ModelUtils {
try
{
// delegate to static valueOf() method to parse string
Method
m
=
modelClass
.
getMethod
(
"valueOf"
,
String
.
class
);
Object
o
=
m
.
invoke
(
null
,
unquoted
);
m
.
invoke
(
null
,
unquoted
);
}
catch
(
NumberFormatException
ex
)
{
return
false
;
}
catch
(
Throwable
t
)
{
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论