Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
59ac122b
提交
59ac122b
authored
6月 21, 2018
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix building of documentation
上级
40cfe298
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
45 行增加
和
21 行删除
+45
-21
MetaRecord.java
h2/src/main/org/h2/engine/MetaRecord.java
+8
-0
DbException.java
h2/src/main/org/h2/message/DbException.java
+2
-1
TxDecisionMaker.java
h2/src/main/org/h2/mvstore/tx/TxDecisionMaker.java
+11
-8
H2AuthConfig.java
h2/src/main/org/h2/security/auth/H2AuthConfig.java
+1
-1
H2AuthConfigXml.java
h2/src/main/org/h2/security/auth/H2AuthConfigXml.java
+4
-4
HasConfigProperties.java
h2/src/main/org/h2/security/auth/HasConfigProperties.java
+3
-0
RealmConfig.java
h2/src/main/org/h2/security/auth/RealmConfig.java
+5
-1
UserToRolesMapperConfig.java
...rc/main/org/h2/security/auth/UserToRolesMapperConfig.java
+5
-1
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+1
-1
TestAuthentication.java
h2/src/test/org/h2/test/auth/TestAuthentication.java
+2
-2
TestTransactionStore.java
h2/src/test/org/h2/test/store/TestTransactionStore.java
+2
-2
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-0
没有找到文件。
h2/src/main/org/h2/engine/MetaRecord.java
浏览文件 @
59ac122b
...
...
@@ -24,6 +24,14 @@ public class MetaRecord implements Comparable<MetaRecord> {
private
final
int
objectType
;
private
final
String
sql
;
/**
* Copy metadata from the specified object into specified search row.
*
* @param obj
* database object
* @param r
* search row
*/
public
static
void
populateRowFromDBObject
(
DbObject
obj
,
SearchRow
r
)
{
r
.
setValue
(
0
,
ValueInt
.
get
(
obj
.
getId
()));
r
.
setValue
(
1
,
ValueInt
.
get
(
0
));
...
...
h2/src/main/org/h2/message/DbException.java
浏览文件 @
59ac122b
...
...
@@ -311,7 +311,8 @@ public class DbException extends RuntimeException {
return
get
(
ErrorCode
.
GENERAL_ERROR_1
,
e
,
e
.
toString
());
}
catch
(
Throwable
ex
)
{
try
{
DbException
dbException
=
new
DbException
(
new
SQLException
(
"GeneralError"
,
"HY000"
,
ErrorCode
.
GENERAL_ERROR_1
,
e
));
DbException
dbException
=
new
DbException
(
new
SQLException
(
"GeneralError"
,
"HY000"
,
ErrorCode
.
GENERAL_ERROR_1
,
e
));
dbException
.
addSuppressed
(
ex
);
return
dbException
;
}
catch
(
OutOfMemoryError
ignore
)
{
...
...
h2/src/main/org/h2/mvstore/tx/TxDecisionMaker.java
浏览文件 @
59ac122b
...
...
@@ -49,16 +49,19 @@ public abstract class TxDecisionMaker extends MVMap.DecisionMaker<VersionedValue
// because a tree root has definitely been changed.
logIt
(
existingValue
.
value
==
null
?
null
:
VersionedValue
.
getInstance
(
existingValue
.
value
));
decision
=
MVMap
.
Decision
.
PUT
;
}
else
if
(
fetchTransaction
(
blockingId
)
!=
null
)
{
// this entry comes from a different transaction, and this transaction is not committed yet
}
else
if
(
fetchTransaction
(
blockingId
)
!=
null
)
{
// this entry comes from a different transaction, and this
// transaction is not committed yet
// should wait on blockingTransaction that was determined earlier
decision
=
MVMap
.
Decision
.
ABORT
;
}
else
if
(
id
==
lastOperationId
)
{
// There is no transaction with that id, so we've retried it just before,
// but map root has not changed (which must be the case if we just missed a closed transaction),
// therefore we came back here again.
// Now we assume it's a leftover after unclean shutdown (map update was written but not undo log),
// and will effectively roll it back (just overwrite).
}
else
if
(
id
==
lastOperationId
)
{
// There is no transaction with that id, so we've retried it just
// before, but map root has not changed (which must be the case if
// we just missed a closed transaction), therefore we came back here
// again.
// Now we assume it's a leftover after unclean shutdown (map update
// was written but not undo log), and will effectively roll it back
// (just overwrite).
Object
committedValue
=
existingValue
.
getCommittedValue
();
logIt
(
committedValue
==
null
?
null
:
VersionedValue
.
getInstance
(
committedValue
));
decision
=
MVMap
.
Decision
.
PUT
;
...
...
h2/src/main/org/h2/security/auth/H2AuthConfig.java
浏览文件 @
59ac122b
...
...
@@ -22,7 +22,7 @@ public class H2AuthConfig {
public
void
setAllowUserRegistration
(
boolean
allowUserRegistration
)
{
this
.
allowUserRegistration
=
allowUserRegistration
;
}
boolean
createMissingRoles
=
true
;
public
boolean
isCreateMissingRoles
()
{
...
...
h2/src/main/org/h2/security/auth/H2AuthConfigXml.java
浏览文件 @
59ac122b
...
...
@@ -58,7 +58,7 @@ public class H2AuthConfigXml extends DefaultHandler{
default
:
throw
new
SAXException
(
"unexpected element "
+
qName
);
}
}
@Override
...
...
@@ -74,7 +74,7 @@ public class H2AuthConfigXml extends DefaultHandler{
throw
new
SAXException
(
"missing attribute "
+
attributeName
);
}
return
attributeValue
;
}
static
String
getAttributeValueOr
(
String
attributeName
,
Attributes
attributes
,
String
defaultValue
)
{
...
...
@@ -90,7 +90,7 @@ public class H2AuthConfigXml extends DefaultHandler{
}
/**
* Parse the xml
* Parse the xml
* @param url
* @return
* @throws Exception
...
...
@@ -102,7 +102,7 @@ public class H2AuthConfigXml extends DefaultHandler{
}
public
static
H2AuthConfig
parseFrom
(
InputStream
inputStream
)
throws
Exception
{
SAXParser
saxParser
=
SAXParserFactory
.
newInstance
().
newSAXParser
();
SAXParser
saxParser
=
SAXParserFactory
.
newInstance
().
newSAXParser
();
H2AuthConfigXml
xmlHandler
=
new
H2AuthConfigXml
();
saxParser
.
parse
(
inputStream
,
xmlHandler
);
return
xmlHandler
.
getResult
();
...
...
h2/src/main/org/h2/security/auth/HasConfigProperties.java
浏览文件 @
59ac122b
...
...
@@ -7,6 +7,9 @@ package org.h2.security.auth;
import
java.util.List
;
/**
* Interface for objects with configuration properties.
*/
public
interface
HasConfigProperties
{
List
<
PropertyConfig
>
getProperties
();
}
h2/src/main/org/h2/security/auth/RealmConfig.java
浏览文件 @
59ac122b
...
...
@@ -8,7 +8,10 @@ package org.h2.security.auth;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
RealmConfig
implements
HasConfigProperties
{
/**
* Configuration for authentication realm.
*/
public
class
RealmConfig
implements
HasConfigProperties
{
private
String
name
;
...
...
@@ -32,6 +35,7 @@ public class RealmConfig implements HasConfigProperties{
List
<
PropertyConfig
>
properties
;
@Override
public
List
<
PropertyConfig
>
getProperties
()
{
if
(
properties
==
null
)
{
properties
=
new
ArrayList
<>();
...
...
h2/src/main/org/h2/security/auth/UserToRolesMapperConfig.java
浏览文件 @
59ac122b
...
...
@@ -8,7 +8,10 @@ package org.h2.security.auth;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
UserToRolesMapperConfig
implements
HasConfigProperties
{
/**
* Configuration for class that maps users to their roles.
*/
public
class
UserToRolesMapperConfig
implements
HasConfigProperties
{
private
String
className
;
...
...
@@ -22,6 +25,7 @@ public class UserToRolesMapperConfig implements HasConfigProperties{
this
.
className
=
className
;
}
@Override
public
List
<
PropertyConfig
>
getProperties
()
{
if
(
properties
==
null
)
{
properties
=
new
ArrayList
<>();
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
59ac122b
...
...
@@ -889,7 +889,7 @@ kill -9 `jps -l | grep "org.h2.test." | cut -d " " -f 1`
*/
private
void
testAdditional
()
{
if
(
networked
)
{
throw
new
RuntimeException
(
"testAditional() is not allowed in networked mode"
);
throw
new
RuntimeException
(
"testAd
d
itional() is not allowed in networked mode"
);
}
addTest
(
new
TestMVTableEngine
());
...
...
h2/src/test/org/h2/test/auth/TestAuthentication.java
浏览文件 @
59ac122b
...
...
@@ -278,7 +278,7 @@ public class TestAuthentication extends TestBase {
}
testExternalUser
();
}
static
final
String
TESTXML
=
"<h2Auth allowUserRegistration=\"true\" createMissingRoles=\"false\">"
+
"<realm name=\"ciao\" validatorClass=\"myclass\"/>"
+
"<realm name=\"miao\" validatorClass=\"myclass1\">"
...
...
@@ -288,7 +288,7 @@ public class TestAuthentication extends TestBase {
+
"</userToRolesMapper>"
+
"</realm>"
+
"</h2Auth>"
;
protected
void
testXmlConfig
()
throws
Exception
{
ByteArrayInputStream
inputStream
=
new
ByteArrayInputStream
(
TESTXML
.
getBytes
());
H2AuthConfig
config
=
H2AuthConfigXml
.
parseFrom
(
inputStream
);
...
...
h2/src/test/org/h2/test/store/TestTransactionStore.java
浏览文件 @
59ac122b
...
...
@@ -421,9 +421,9 @@ public class TestTransactionStore extends TestBase {
}
}
private
boolean
hasDataUndoLog
(
MVStore
s
)
{
private
static
boolean
hasDataUndoLog
(
MVStore
s
)
{
for
(
int
i
=
0
;
i
<
255
;
i
++)
{
if
(
s
.
hasData
(
TransactionStore
.
getUndoLogName
(
true
,
1
)))
{
if
(
s
.
hasData
(
TransactionStore
.
getUndoLogName
(
true
,
1
)))
{
return
true
;
}
}
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
59ac122b
...
...
@@ -783,3 +783,4 @@ intentionally authenticator authrealm ventura credentials alessandro validator a
ewkt ewkb informations authzpwd realms mappers jaxb realmname configurationfile unmarshal jaas externals customize
authenticators appname interrogate metatable barrier preliminary staticuser staticpassword unregistered inquiry
ldapexample remoteuser assignments djava validators mock relate mapid tighten
retried helpers unclean missed parsers sax myclass suppose mandatory testxml miao ciao
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论