Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
26f5e81f
提交
26f5e81f
authored
17 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
8e6fb47b
master
noel-pr1
plus33-master
pr/267
stumc-Issue#576
version-1.1.x
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
version-1.2
version-1.1
version-1.0
无相关合并请求
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
23 个修改的文件
包含
2487 行增加
和
1646 行删除
+2487
-1646
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+539
-521
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+1031
-531
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+526
-520
GrantRevoke.java
h2/src/main/org/h2/command/ddl/GrantRevoke.java
+1
-2
SelectUnion.java
h2/src/main/org/h2/command/dml/SelectUnion.java
+1
-2
ErrorCode.java
h2/src/main/org/h2/constant/ErrorCode.java
+269
-4
Database.java
h2/src/main/org/h2/engine/Database.java
+1
-2
_messages_de.properties
h2/src/main/org/h2/res/_messages_de.properties
+1
-1
Schema.java
h2/src/main/org/h2/schema/Schema.java
+1
-2
Sequence.java
h2/src/main/org/h2/schema/Sequence.java
+2
-3
WebThread.java
h2/src/main/org/h2/server/web/WebThread.java
+30
-21
FileLock.java
h2/src/main/org/h2/store/FileLock.java
+1
-2
ByteUtils.java
h2/src/main/org/h2/util/ByteUtils.java
+15
-7
DataType.java
h2/src/main/org/h2/value/DataType.java
+1
-2
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+4
-0
TestXASimple.java
h2/src/test/org/h2/test/jdbcx/TestXASimple.java
+6
-6
TestFileSystem.java
h2/src/test/org/h2/test/unit/TestFileSystem.java
+5
-1
TestStringUtils.java
h2/src/test/org/h2/test/unit/TestStringUtils.java
+22
-0
web.xml
h2/src/tools/WEB-INF/web.xml
+14
-15
LinkChecker.java
h2/src/tools/org/h2/tools/doc/LinkChecker.java
+13
-1
XMLChecker.java
h2/src/tools/org/h2/tools/doc/XMLChecker.java
+1
-1
dictionary.txt
h2/src/tools/org/h2/tools/doc/dictionary.txt
+2
-1
PrepareTranslation.java
h2/src/tools/org/h2/tools/i18n/PrepareTranslation.java
+1
-1
没有找到文件。
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/main/org/h2/command/ddl/GrantRevoke.java
浏览文件 @
26f5e81f
...
...
@@ -12,7 +12,6 @@ import org.h2.engine.Right;
import
org.h2.engine.RightOwner
;
import
org.h2.engine.Role
;
import
org.h2.engine.Session
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.table.Table
;
import
org.h2.util.ObjectArray
;
...
...
@@ -52,7 +51,7 @@ public class GrantRevoke extends DefineCommand {
roleNames
.
add
(
roleName
);
}
public
void
setGranteeName
(
String
granteeName
)
throws
Jdbc
SQLException
{
public
void
setGranteeName
(
String
granteeName
)
throws
SQLException
{
Database
db
=
session
.
getDatabase
();
grantee
=
db
.
findUser
(
granteeName
);
if
(
grantee
==
null
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/command/dml/SelectUnion.java
浏览文件 @
26f5e81f
...
...
@@ -15,7 +15,6 @@ import org.h2.expression.ExpressionColumn;
import
org.h2.expression.ExpressionVisitor
;
import
org.h2.expression.Parameter
;
import
org.h2.expression.ValueExpression
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.result.LocalResult
;
import
org.h2.result.SortOrder
;
...
...
@@ -50,7 +49,7 @@ public class SelectUnion extends Query {
this
.
unionType
=
type
;
}
public
void
setRight
(
Query
select
)
throws
Jdbc
SQLException
{
public
void
setRight
(
Query
select
)
throws
SQLException
{
right
=
select
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/constant/ErrorCode.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/main/org/h2/engine/Database.java
浏览文件 @
26f5e81f
...
...
@@ -21,7 +21,6 @@ import org.h2.constant.SysProperties;
import
org.h2.index.Cursor
;
import
org.h2.index.Index
;
import
org.h2.index.IndexType
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.log.LogSystem
;
import
org.h2.log.UndoLogRecord
;
import
org.h2.message.Message
;
...
...
@@ -378,7 +377,7 @@ public class Database implements DataHandler {
return
store
;
}
public
void
checkFilePasswordHash
(
String
c
,
byte
[]
hash
)
throws
Jdbc
SQLException
{
public
void
checkFilePasswordHash
(
String
c
,
byte
[]
hash
)
throws
SQLException
{
if
(!
ByteUtils
.
compareSecure
(
hash
,
filePasswordHash
)
||
!
StringUtils
.
equals
(
c
,
cipher
))
{
throw
Message
.
getSQLException
(
ErrorCode
.
WRONG_USER_OR_PASSWORD
);
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/res/_messages_de.properties
浏览文件 @
26f5e81f
...
...
@@ -20,7 +20,7 @@
42S21
=
Doppelter Feldname {0}
42S22
=
Feld {0} nicht gefunden
42S32
=
Einstellung {0} nicht gefunden
90000
=
Funktion {0} muss
einen
Zeilen zur
\u
00FCckgeben
90000
=
Funktion {0} muss Zeilen zur
\u
00FCckgeben
90001
=
Methode nicht zul
\u
00E4ssig f
\u
00FCr eine Abfrage. Erlaubt sind execute oder executeQuery, nicht jedoch executeUpdate
90002
=
Methode nur zul
\u
00E4ssig for eine Abfrage. Erlaubt sind execute oder executeUpdate, nicht jedoch executeQuery
90003
=
Hexadezimal Zahl mit einer ungeraden Anzahl Zeichen
\:
{0}
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/schema/Schema.java
浏览文件 @
26f5e81f
...
...
@@ -17,7 +17,6 @@ import org.h2.engine.DbObjectBase;
import
org.h2.engine.Session
;
import
org.h2.engine.User
;
import
org.h2.index.Index
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.message.Trace
;
import
org.h2.table.Table
;
...
...
@@ -222,7 +221,7 @@ public class Schema extends DbObjectBase {
return
table
;
}
public
Index
getIndex
(
String
name
)
throws
Jdbc
SQLException
{
public
Index
getIndex
(
String
name
)
throws
SQLException
{
Index
index
=
(
Index
)
indexes
.
get
(
name
);
if
(
index
==
null
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
INDEX_NOT_FOUND_1
,
name
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/schema/Sequence.java
浏览文件 @
26f5e81f
...
...
@@ -9,7 +9,6 @@ import java.sql.SQLException;
import
org.h2.constant.ErrorCode
;
import
org.h2.engine.DbObject
;
import
org.h2.engine.Session
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.message.Trace
;
import
org.h2.table.Table
;
...
...
@@ -44,8 +43,8 @@ public class Sequence extends SchemaObjectBase {
return
increment
;
}
public
void
setIncrement
(
long
inc
)
throws
Jdbc
SQLException
{
if
(
inc
rement
==
0
)
{
public
void
setIncrement
(
long
inc
)
throws
SQLException
{
if
(
inc
==
0
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
INVALID_VALUE_2
,
new
String
[]
{
"0"
,
"INCREMENT"
},
null
);
}
this
.
increment
=
inc
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/server/web/WebThread.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/main/org/h2/store/FileLock.java
浏览文件 @
26f5e81f
...
...
@@ -17,7 +17,6 @@ import java.util.Properties;
import
org.h2.constant.ErrorCode
;
import
org.h2.constant.SysProperties
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.message.Trace
;
import
org.h2.message.TraceSystem
;
...
...
@@ -314,7 +313,7 @@ public class FileLock {
return
Message
.
getSQLException
(
ErrorCode
.
DATABASE_ALREADY_OPEN_1
,
reason
);
}
public
static
int
getFileLockMethod
(
String
method
)
throws
Jdbc
SQLException
{
public
static
int
getFileLockMethod
(
String
method
)
throws
SQLException
{
if
(
method
==
null
||
method
.
equalsIgnoreCase
(
"FILE"
))
{
return
FileLock
.
LOCK_FILE
;
}
else
if
(
method
.
equalsIgnoreCase
(
"NO"
))
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/util/ByteUtils.java
浏览文件 @
26f5e81f
...
...
@@ -50,17 +50,25 @@ public class ByteUtils {
}
len
/=
2
;
byte
[]
buff
=
new
byte
[
len
];
try
{
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
buff
[
i
]
=
(
byte
)
((
Character
.
digit
(
s
.
charAt
(
i
+
i
),
16
)
<<
4
)
|
(
Character
.
digit
(
s
.
charAt
(
i
+
i
+
1
),
16
)));
}
}
catch
(
NumberFormatException
e
)
{
throw
Message
.
getSQLException
(
ErrorCode
.
HEX_STRING_WRONG_1
,
s
);
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
buff
[
i
]
=
(
byte
)
((
getHexDigit
(
s
,
i
+
i
)
<<
4
)
|
getHexDigit
(
s
,
i
+
i
+
1
));
}
return
buff
;
}
private
static
int
getHexDigit
(
String
s
,
int
i
)
throws
SQLException
{
char
c
=
s
.
charAt
(
i
);
if
(
c
>=
'0'
&&
c
<=
'9'
)
{
return
c
-
'0'
;
}
else
if
(
c
>=
'a'
&&
c
<=
'f'
)
{
return
c
-
'a'
+
0xa
;
}
else
if
(
c
>=
'A'
&&
c
<=
'F'
)
{
return
c
-
'A'
+
0xa
;
}
else
{
throw
Message
.
getSQLException
(
ErrorCode
.
HEX_STRING_WRONG_1
,
s
);
}
}
public
static
int
getByteArrayHash
(
byte
[]
value
)
{
int
h
=
1
;
for
(
int
i
=
0
;
i
<
value
.
length
;)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/value/DataType.java
浏览文件 @
26f5e81f
...
...
@@ -24,7 +24,6 @@ import org.h2.engine.SessionInterface;
import
org.h2.jdbc.JdbcBlob
;
import
org.h2.jdbc.JdbcClob
;
import
org.h2.jdbc.JdbcConnection
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.message.Message
;
import
org.h2.util.ObjectArray
;
import
org.h2.util.ObjectUtils
;
...
...
@@ -740,7 +739,7 @@ public class DataType {
}
public
static
Object
convertTo
(
SessionInterface
session
,
JdbcConnection
conn
,
Value
v
,
Class
paramClass
)
throws
Jdbc
SQLException
{
throws
SQLException
{
if
(
paramClass
==
java
.
sql
.
Blob
.
class
)
{
return
new
JdbcBlob
(
session
,
conn
,
v
,
0
);
}
else
if
(
paramClass
==
Clob
.
class
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
26f5e81f
...
...
@@ -150,6 +150,8 @@ java org.h2.test.TestAll timer
/*
orphan?
javadoc: design patterns
sourceforge h2 database
update wikipedia
...
...
@@ -164,6 +166,8 @@ Roadmap:
Move Maven 2 repository from hsql.sf.net to h2database.sf.net
History:
The exception "Hexadecimal string contains non-hex character" was not always thrown when it should have been. Fixed.
The H2 Console now provides a link to the documentation when an error occurs (H2 databases only so far).
Test Recovery with MAX_LOG_FILE_SIZE=1; test with various log file sizes
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/jdbcx/TestXASimple.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/test/org/h2/test/unit/TestFileSystem.java
浏览文件 @
26f5e81f
...
...
@@ -113,7 +113,11 @@ public class TestFileSystem extends TestBase {
random
.
nextBytes
(
buffer
);
fo
.
write
(
buffer
,
0
,
10000
);
fo
.
close
();
check
(
fs
.
getLastModified
(
fsBase
+
"/test"
)
>=
time
);
long
lastMod
=
fs
.
getLastModified
(
fsBase
+
"/test"
);
if
(
lastMod
<
time
-
999
)
{
// at most 1 second difference
check
(
lastMod
,
time
);
}
check
(
fs
.
length
(
fsBase
+
"/test"
),
10000
);
list
=
fs
.
listFiles
(
fsBase
);
check
(
list
.
length
,
1
);
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestStringUtils.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/tools/WEB-INF/web.xml
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/tools/org/h2/tools/doc/LinkChecker.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/tools/org/h2/tools/doc/XMLChecker.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/tools/org/h2/tools/doc/dictionary.txt
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
h2/src/tools/org/h2/tools/i18n/PrepareTranslation.java
浏览文件 @
26f5e81f
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论