Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
f7352ac0
提交
f7352ac0
authored
9月 16, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make FindBugs happy
上级
dd961ff8
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
27 行增加
和
23 行删除
+27
-23
Db.java
h2/src/test/org/h2/test/db/Db.java
+1
-1
TestCluster.java
h2/src/test/org/h2/test/db/TestCluster.java
+1
-2
TestEncryptedDb.java
h2/src/test/org/h2/test/db/TestEncryptedDb.java
+1
-1
TestFullText.java
h2/src/test/org/h2/test/db/TestFullText.java
+1
-1
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+2
-2
TestLob.java
h2/src/test/org/h2/test/db/TestLob.java
+2
-2
TestRights.java
h2/src/test/org/h2/test/db/TestRights.java
+1
-1
TestTempTables.java
h2/src/test/org/h2/test/db/TestTempTables.java
+1
-1
TestPreparedStatement.java
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
+1
-1
TestTools.java
h2/src/test/org/h2/test/unit/TestTools.java
+2
-2
SwitchSource.java
h2/src/tools/org/h2/build/code/SwitchSource.java
+6
-2
SpellChecker.java
h2/src/tools/org/h2/build/doc/SpellChecker.java
+1
-1
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
PrepareTranslation.java
h2/src/tools/org/h2/build/i18n/PrepareTranslation.java
+2
-1
HtmlConverter.java
h2/src/tools/org/h2/build/indexer/HtmlConverter.java
+2
-2
FileViewer.java
h2/src/tools/org/h2/dev/util/FileViewer.java
+2
-2
没有找到文件。
h2/src/test/org/h2/test/db/Db.java
浏览文件 @
f7352ac0
...
...
@@ -148,7 +148,7 @@ public class Db {
/**
* This class represents a prepared statement.
*/
public
class
Prepared
{
public
static
class
Prepared
{
private
PreparedStatement
prep
;
private
int
index
;
...
...
h2/src/test/org/h2/test/db/TestCluster.java
浏览文件 @
f7352ac0
...
...
@@ -73,7 +73,7 @@ public class TestCluster extends TestBase {
}
try
{
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9192/test"
,
user
,
password
);
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9192/test"
,
user
,
password
);
fail
(
"should not be able to connect in standalone mode"
);
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
@@ -87,7 +87,6 @@ public class TestCluster extends TestBase {
// test if only one server is available at the beginning
n2
.
stop
();
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9191,localhost:9192/test"
,
user
,
password
);
stat
=
conn
.
createStatement
();
check
(
conn
,
len
);
conn
.
close
();
...
...
h2/src/test/org/h2/test/db/TestEncryptedDb.java
浏览文件 @
f7352ac0
...
...
@@ -46,7 +46,7 @@ public class TestEncryptedDb extends TestBase {
}
try
{
conn
=
getConnection
(
"exclusive;CIPHER=AES"
,
"sa"
,
"1234 1234"
);
getConnection
(
"exclusive;CIPHER=AES"
,
"sa"
,
"1234 1234"
);
fail
();
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
h2/src/test/org/h2/test/db/TestFullText.java
浏览文件 @
f7352ac0
...
...
@@ -224,7 +224,7 @@ public class TestFullText extends TestBase {
rs
=
stat
.
executeQuery
(
"SELECT * FROM "
+
prefix
+
"SEARCH('World', 0, 0)"
);
stat
.
execute
(
"CALL "
+
prefix
+
"DROP_ALL()"
);
rs
=
stat
.
executeQuery
(
"SELECT * FROM "
+
prefix
+
"SEARCH('World', 2, 1)"
);
stat
.
executeQuery
(
"SELECT * FROM "
+
prefix
+
"SEARCH('World', 2, 1)"
);
stat
.
execute
(
"CALL "
+
prefix
+
"DROP_ALL()"
);
conn
.
close
();
...
...
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
f7352ac0
...
...
@@ -268,7 +268,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
conn
=
getConnection
(
"functions"
);
stat
=
conn
.
createStatement
();
rs
=
stat
.
executeQuery
(
"SELECT MEDIAN(X) FROM SYSTEM_RANGE(1, 9)"
);
stat
.
executeQuery
(
"SELECT MEDIAN(X) FROM SYSTEM_RANGE(1, 9)"
);
DatabaseMetaData
meta
=
conn
.
getMetaData
();
rs
=
meta
.
getProcedures
(
null
,
null
,
"MEDIAN"
);
assertTrue
(
rs
.
next
());
...
...
@@ -343,7 +343,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
assertFalse
(
rs
.
next
());
try
{
rs
=
stat
.
executeQuery
(
"CALL SELECT_F('ERROR')"
);
stat
.
executeQuery
(
"CALL SELECT_F('ERROR')"
);
fail
();
}
catch
(
SQLException
e
)
{
assertEquals
(
"42001"
,
e
.
getSQLState
());
...
...
h2/src/test/org/h2/test/db/TestLob.java
浏览文件 @
f7352ac0
...
...
@@ -450,9 +450,9 @@ public class TestLob extends TestBase {
conn
=
reconnect
(
null
);
Statement
stat
=
conn
.
createStatement
();
if
(
compress
)
{
conn
.
createStatement
()
.
execute
(
"SET COMPRESS_LOB LZF"
);
stat
.
execute
(
"SET COMPRESS_LOB LZF"
);
}
else
{
conn
.
createStatement
()
.
execute
(
"SET COMPRESS_LOB NO"
);
stat
.
execute
(
"SET COMPRESS_LOB NO"
);
}
conn
=
reconnect
(
conn
);
stat
=
conn
.
createStatement
();
...
...
h2/src/test/org/h2/test/db/TestRights.java
浏览文件 @
f7352ac0
...
...
@@ -210,7 +210,7 @@ public class TestRights extends TestBase {
assertKnownException
(
e
);
}
try
{
conn
=
getConnection
(
"rights"
,
"TEST"
,
getPassword
(
""
));
getConnection
(
"rights"
,
"TEST"
,
getPassword
(
""
));
fail
(
"wrong password"
);
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
h2/src/test/org/h2/test/db/TestTempTables.java
浏览文件 @
f7352ac0
...
...
@@ -101,7 +101,7 @@ public class TestTempTables extends TestBase {
assertResultRowCount
(
rs
,
1
);
c1
.
commit
();
try
{
rs
=
s1
.
executeQuery
(
"select * from test_temp"
);
s1
.
executeQuery
(
"select * from test_temp"
);
fail
(
"test_temp should have been dropped automatically"
);
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
h2/src/test/org/h2/test/jdbc/TestPreparedStatement.java
浏览文件 @
f7352ac0
...
...
@@ -540,7 +540,7 @@ public class TestPreparedStatement extends TestBase {
rs
=
prep
.
executeQuery
();
assertFalse
(
rs
.
next
());
try
{
prep
=
conn
.
prepareStatement
(
"select ? from dual union select ? from dual"
);
conn
.
prepareStatement
(
"select ? from dual union select ? from dual"
);
fail
();
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
h2/src/test/org/h2/test/unit/TestTools.java
浏览文件 @
f7352ac0
...
...
@@ -146,7 +146,7 @@ public class TestTools extends TestBase {
assertTrue
(
result
.
indexOf
(
"Shutting down"
)
>=
0
);
stop
.
shutdown
();
try
{
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9006/mem:"
,
"sa"
,
"sa"
);
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9006/mem:"
,
"sa"
,
"sa"
);
fail
();
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
@@ -475,7 +475,7 @@ public class TestTools extends TestBase {
// check that the database is closed
deleteDb
(
"test"
);
try
{
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9192/test"
,
"sa"
,
""
);
DriverManager
.
getConnection
(
"jdbc:h2:tcp://localhost:9192/test"
,
"sa"
,
""
);
fail
(
"server must have been closed"
);
}
catch
(
SQLException
e
)
{
assertKnownException
(
e
);
...
...
h2/src/tools/org/h2/build/code/SwitchSource.java
浏览文件 @
f7352ac0
...
...
@@ -152,8 +152,12 @@ public class SwitchSource {
fileBack
.
delete
();
f
.
renameTo
(
fileBack
);
File
fileCopy
=
new
File
(
name
);
fileNew
.
renameTo
(
fileCopy
);
fileBack
.
delete
();
if
(!
fileNew
.
renameTo
(
fileCopy
))
{
throw
new
IOException
(
"Could not rename "
+
fileNew
.
getAbsolutePath
()
+
" to "
+
name
);
}
if
(!
fileBack
.
delete
())
{
throw
new
IOException
(
"Could not delete "
+
fileBack
.
getAbsolutePath
());
}
// System.out.println(name);
}
}
...
...
h2/src/tools/org/h2/build/doc/SpellChecker.java
浏览文件 @
f7352ac0
...
...
@@ -261,7 +261,7 @@ public class SpellChecker {
private
void
increment
(
HashMap
<
String
,
Integer
>
map
,
String
key
)
{
Integer
value
=
map
.
get
(
key
);
value
=
new
Integer
(
value
==
null
?
0
:
value
+
1
);
value
=
Integer
.
valueOf
(
value
==
null
?
0
:
value
+
1
);
map
.
put
(
key
,
value
);
contextCount
=
10
;
}
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
f7352ac0
...
...
@@ -611,4 +611,4 @@ daload dstore saload anewarray tableswitch lushr ladd lshr lreturn acmpne
locals multianewarray icmpne fneg faload ifeq decompiler zeroes forgot
modern slight boost characteristics significantly gae vfs centrally ten
approach risky getters suxxess gmb delegate delegating delegates collisions
linkage
\ No newline at end of file
linkage superfluous
\ No newline at end of file
h2/src/tools/org/h2/build/i18n/PrepareTranslation.java
浏览文件 @
f7352ac0
...
...
@@ -490,8 +490,9 @@ public class PrepareTranslation {
}
}
}
Map
<
String
,
String
>
autoTranslated
=
new
HashMap
<
String
,
String
>()
;
Map
<
String
,
String
>
autoTranslated
;
if
(
AUTO_TRANSLATE
)
{
autoTranslated
=
new
HashMap
<
String
,
String
>();
HashSet
<
String
>
set
=
new
HashSet
<
String
>();
for
(
String
key
:
toTranslate
)
{
String
now
=
main
.
getProperty
(
key
);
...
...
h2/src/tools/org/h2/build/indexer/HtmlConverter.java
浏览文件 @
f7352ac0
...
...
@@ -59,7 +59,7 @@ public class HtmlConverter {
int
idx
=
token
.
indexOf
(
':'
);
String
key
=
token
.
substring
(
0
,
idx
);
int
ch
=
Integer
.
parseInt
(
token
.
substring
(
idx
+
1
));
Character
character
=
new
Character
((
char
)
ch
);
Character
character
=
Character
.
valueOf
((
char
)
ch
);
charMap
.
put
(
key
,
character
);
codeMap
.
put
(
character
,
key
);
}
...
...
@@ -136,7 +136,7 @@ public class HtmlConverter {
if
(
code
<
0
||
code
>
0xffff
)
{
repl
=
null
;
}
else
{
repl
=
new
Character
((
char
)
code
);
repl
=
Character
.
valueOf
((
char
)
code
);
}
}
catch
(
NumberFormatException
e
)
{
repl
=
null
;
...
...
h2/src/tools/org/h2/dev/util/FileViewer.java
浏览文件 @
f7352ac0
...
...
@@ -104,7 +104,7 @@ public class FileViewer extends Tool {
}
}
if
(
tail
)
{
long
pos
=
length
-
100
*
lines
;
long
pos
=
length
-
100
L
*
lines
;
ArrayList
<
String
>
list
=
null
;
while
(
pos
>
0
)
{
file
.
seek
(
pos
);
...
...
@@ -112,7 +112,7 @@ public class FileViewer extends Tool {
if
(
list
.
size
()
>
lines
)
{
break
;
}
pos
-=
100
*
lines
;
pos
-=
100
L
*
lines
;
}
// remove the first (maybe partial) line
list
.
remove
(
0
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论