Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
b77d4831
提交
b77d4831
authored
5月 18, 2018
作者:
Jacek Ławrynowicz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove converting to string using concatenation with empty string
上级
064dc058
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
16 行增加
和
17 行删除
+16
-17
Session.java
h2/src/main/org/h2/engine/Session.java
+1
-1
PageBtreeIndex.java
h2/src/main/org/h2/index/PageBtreeIndex.java
+2
-2
PageDataIndex.java
h2/src/main/org/h2/index/PageDataIndex.java
+1
-1
PageDataLeaf.java
h2/src/main/org/h2/index/PageDataLeaf.java
+1
-1
PageDelegateIndex.java
h2/src/main/org/h2/index/PageDelegateIndex.java
+1
-1
JdbcConnection.java
h2/src/main/org/h2/jdbc/JdbcConnection.java
+1
-1
MVDelegateIndex.java
h2/src/main/org/h2/mvstore/db/MVDelegateIndex.java
+1
-1
WebApp.java
h2/src/main/org/h2/server/web/WebApp.java
+5
-5
LobStorageMap.java
h2/src/main/org/h2/store/LobStorageMap.java
+1
-2
MetaTable.java
h2/src/main/org/h2/table/MetaTable.java
+2
-2
没有找到文件。
h2/src/main/org/h2/engine/Session.java
浏览文件 @
b77d4831
...
@@ -924,7 +924,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
...
@@ -924,7 +924,7 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
if
(!
locks
.
contains
(
log
.
getTable
())
if
(!
locks
.
contains
(
log
.
getTable
())
&&
TableType
.
TABLE_LINK
!=
tableType
&&
TableType
.
TABLE_LINK
!=
tableType
&&
TableType
.
EXTERNAL_TABLE_ENGINE
!=
tableType
)
{
&&
TableType
.
EXTERNAL_TABLE_ENGINE
!=
tableType
)
{
DbException
.
throwInternalError
(
""
+
tableType
);
DbException
.
throwInternalError
(
String
.
valueOf
(
tableType
)
);
}
}
}
}
}
}
...
...
h2/src/main/org/h2/index/PageBtreeIndex.java
浏览文件 @
b77d4831
...
@@ -51,7 +51,7 @@ public class PageBtreeIndex extends PageIndex {
...
@@ -51,7 +51,7 @@ public class PageBtreeIndex extends PageIndex {
// trace.setLevel(TraceSystem.DEBUG);
// trace.setLevel(TraceSystem.DEBUG);
tableData
=
table
;
tableData
=
table
;
if
(!
database
.
isPersistent
()
||
id
<
0
)
{
if
(!
database
.
isPersistent
()
||
id
<
0
)
{
throw
DbException
.
throwInternalError
(
""
+
indexName
);
throw
DbException
.
throwInternalError
(
indexName
);
}
}
this
.
store
=
database
.
getPageStore
();
this
.
store
=
database
.
getPageStore
();
store
.
addIndex
(
this
);
store
.
addIndex
(
this
);
...
@@ -154,7 +154,7 @@ public class PageBtreeIndex extends PageIndex {
...
@@ -154,7 +154,7 @@ public class PageBtreeIndex extends PageIndex {
store
.
update
(
empty
);
store
.
update
(
empty
);
return
empty
;
return
empty
;
}
else
if
(!(
p
instanceof
PageBtree
))
{
}
else
if
(!(
p
instanceof
PageBtree
))
{
throw
DbException
.
get
(
ErrorCode
.
FILE_CORRUPTED_1
,
""
+
p
);
throw
DbException
.
get
(
ErrorCode
.
FILE_CORRUPTED_1
,
String
.
valueOf
(
p
)
);
}
}
return
(
PageBtree
)
p
;
return
(
PageBtree
)
p
;
}
}
...
...
h2/src/main/org/h2/index/PageDataIndex.java
浏览文件 @
b77d4831
...
@@ -237,7 +237,7 @@ public class PageDataIndex extends PageIndex {
...
@@ -237,7 +237,7 @@ public class PageDataIndex extends PageIndex {
store
.
update
(
empty
);
store
.
update
(
empty
);
return
empty
;
return
empty
;
}
else
if
(!(
pd
instanceof
PageData
))
{
}
else
if
(!(
pd
instanceof
PageData
))
{
throw
DbException
.
get
(
ErrorCode
.
FILE_CORRUPTED_1
,
""
+
pd
);
throw
DbException
.
get
(
ErrorCode
.
FILE_CORRUPTED_1
,
String
.
valueOf
(
pd
)
);
}
}
PageData
p
=
(
PageData
)
pd
;
PageData
p
=
(
PageData
)
pd
;
if
(
parent
!=
-
1
)
{
if
(
parent
!=
-
1
)
{
...
...
h2/src/main/org/h2/index/PageDataLeaf.java
浏览文件 @
b77d4831
...
@@ -153,7 +153,7 @@ public class PageDataLeaf extends PageData {
...
@@ -153,7 +153,7 @@ public class PageDataLeaf extends PageData {
private
int
findInsertionPoint
(
long
key
)
{
private
int
findInsertionPoint
(
long
key
)
{
int
x
=
find
(
key
);
int
x
=
find
(
key
);
if
(
x
<
entryCount
&&
keys
[
x
]
==
key
)
{
if
(
x
<
entryCount
&&
keys
[
x
]
==
key
)
{
throw
index
.
getDuplicateKeyException
(
""
+
key
);
throw
index
.
getDuplicateKeyException
(
String
.
valueOf
(
key
)
);
}
}
return
x
;
return
x
;
}
}
...
...
h2/src/main/org/h2/index/PageDelegateIndex.java
浏览文件 @
b77d4831
...
@@ -32,7 +32,7 @@ public class PageDelegateIndex extends PageIndex {
...
@@ -32,7 +32,7 @@ public class PageDelegateIndex extends PageIndex {
this
.
initBaseIndex
(
table
,
id
,
name
,
cols
,
indexType
);
this
.
initBaseIndex
(
table
,
id
,
name
,
cols
,
indexType
);
this
.
mainIndex
=
mainIndex
;
this
.
mainIndex
=
mainIndex
;
if
(!
database
.
isPersistent
()
||
id
<
0
)
{
if
(!
database
.
isPersistent
()
||
id
<
0
)
{
throw
DbException
.
throwInternalError
(
""
+
name
);
throw
DbException
.
throwInternalError
(
name
);
}
}
PageStore
store
=
database
.
getPageStore
();
PageStore
store
=
database
.
getPageStore
();
store
.
addIndex
(
this
);
store
.
addIndex
(
this
);
...
...
h2/src/main/org/h2/jdbc/JdbcConnection.java
浏览文件 @
b77d4831
...
@@ -1098,7 +1098,7 @@ public class JdbcConnection extends TraceObject
...
@@ -1098,7 +1098,7 @@ public class JdbcConnection extends TraceObject
private
static
JdbcSavepoint
convertSavepoint
(
Savepoint
savepoint
)
{
private
static
JdbcSavepoint
convertSavepoint
(
Savepoint
savepoint
)
{
if
(!(
savepoint
instanceof
JdbcSavepoint
))
{
if
(!(
savepoint
instanceof
JdbcSavepoint
))
{
throw
DbException
.
get
(
ErrorCode
.
SAVEPOINT_IS_INVALID_1
,
throw
DbException
.
get
(
ErrorCode
.
SAVEPOINT_IS_INVALID_1
,
""
+
savepoint
);
String
.
valueOf
(
savepoint
)
);
}
}
return
(
JdbcSavepoint
)
savepoint
;
return
(
JdbcSavepoint
)
savepoint
;
}
}
...
...
h2/src/main/org/h2/mvstore/db/MVDelegateIndex.java
浏览文件 @
b77d4831
...
@@ -35,7 +35,7 @@ public class MVDelegateIndex extends BaseIndex implements MVIndex {
...
@@ -35,7 +35,7 @@ public class MVDelegateIndex extends BaseIndex implements MVIndex {
this
.
initBaseIndex
(
table
,
id
,
name
,
cols
,
indexType
);
this
.
initBaseIndex
(
table
,
id
,
name
,
cols
,
indexType
);
this
.
mainIndex
=
mainIndex
;
this
.
mainIndex
=
mainIndex
;
if
(
id
<
0
)
{
if
(
id
<
0
)
{
throw
DbException
.
throwInternalError
(
""
+
name
);
throw
DbException
.
throwInternalError
(
name
);
}
}
}
}
...
...
h2/src/main/org/h2/server/web/WebApp.java
浏览文件 @
b77d4831
...
@@ -301,7 +301,7 @@ public class WebApp {
...
@@ -301,7 +301,7 @@ public class WebApp {
for
(
Map
.
Entry
<
String
,
String
>
entry
:
map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
entry
:
map
.
entrySet
())
{
String
key
=
entry
.
getKey
();
String
key
=
entry
.
getKey
();
String
value
=
entry
.
getValue
();
String
value
=
entry
.
getValue
();
String
type
=
""
+
key
.
charAt
(
0
);
String
type
=
String
.
valueOf
(
key
.
charAt
(
0
)
);
if
(
Integer
.
parseInt
(
type
)
>
2
)
{
if
(
Integer
.
parseInt
(
type
)
>
2
)
{
continue
;
continue
;
}
}
...
@@ -1182,14 +1182,14 @@ public class WebApp {
...
@@ -1182,14 +1182,14 @@ public class WebApp {
rs
.
addRow
(
"conn.getCatalog"
,
conn
.
getCatalog
());
rs
.
addRow
(
"conn.getCatalog"
,
conn
.
getCatalog
());
rs
.
addRow
(
"conn.getAutoCommit"
,
Boolean
.
toString
(
conn
.
getAutoCommit
()));
rs
.
addRow
(
"conn.getAutoCommit"
,
Boolean
.
toString
(
conn
.
getAutoCommit
()));
rs
.
addRow
(
"conn.getTransactionIsolation"
,
Integer
.
toString
(
conn
.
getTransactionIsolation
()));
rs
.
addRow
(
"conn.getTransactionIsolation"
,
Integer
.
toString
(
conn
.
getTransactionIsolation
()));
rs
.
addRow
(
"conn.getWarnings"
,
""
+
conn
.
getWarnings
(
));
rs
.
addRow
(
"conn.getWarnings"
,
String
.
valueOf
(
conn
.
getWarnings
()
));
String
map
;
String
map
;
try
{
try
{
map
=
""
+
conn
.
getTypeMap
(
);
map
=
String
.
valueOf
(
conn
.
getTypeMap
()
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
map
=
e
.
toString
();
map
=
e
.
toString
();
}
}
rs
.
addRow
(
"conn.getTypeMap"
,
""
+
map
);
rs
.
addRow
(
"conn.getTypeMap"
,
map
);
rs
.
addRow
(
"conn.isReadOnly"
,
Boolean
.
toString
(
conn
.
isReadOnly
()));
rs
.
addRow
(
"conn.isReadOnly"
,
Boolean
.
toString
(
conn
.
isReadOnly
()));
rs
.
addRow
(
"conn.getHoldability"
,
Integer
.
toString
(
conn
.
getHoldability
()));
rs
.
addRow
(
"conn.getHoldability"
,
Integer
.
toString
(
conn
.
getHoldability
()));
addDatabaseMetaData
(
rs
,
meta
);
addDatabaseMetaData
(
rs
,
meta
);
...
@@ -1229,7 +1229,7 @@ public class WebApp {
...
@@ -1229,7 +1229,7 @@ public class WebApp {
if
(
m
.
getParameterTypes
().
length
==
0
)
{
if
(
m
.
getParameterTypes
().
length
==
0
)
{
try
{
try
{
Object
o
=
m
.
invoke
(
meta
);
Object
o
=
m
.
invoke
(
meta
);
rs
.
addRow
(
"meta."
+
m
.
getName
(),
""
+
o
);
rs
.
addRow
(
"meta."
+
m
.
getName
(),
String
.
valueOf
(
o
)
);
}
catch
(
InvocationTargetException
e
)
{
}
catch
(
InvocationTargetException
e
)
{
rs
.
addRow
(
"meta."
+
m
.
getName
(),
e
.
getTargetException
().
toString
());
rs
.
addRow
(
"meta."
+
m
.
getName
(),
e
.
getTargetException
().
toString
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
h2/src/main/org/h2/store/LobStorageMap.java
浏览文件 @
b77d4831
...
@@ -279,8 +279,7 @@ public class LobStorageMap implements LobStorageInterface {
...
@@ -279,8 +279,7 @@ public class LobStorageMap implements LobStorageInterface {
if
(
lob
.
getTableId
()
==
LobStorageFrontend
.
TABLE_RESULT
||
if
(
lob
.
getTableId
()
==
LobStorageFrontend
.
TABLE_RESULT
||
lob
.
getTableId
()
==
LobStorageFrontend
.
TABLE_ID_SESSION_VARIABLE
)
{
lob
.
getTableId
()
==
LobStorageFrontend
.
TABLE_ID_SESSION_VARIABLE
)
{
throw
DbException
.
get
(
throw
DbException
.
get
(
ErrorCode
.
LOB_CLOSED_ON_TIMEOUT_1
,
""
+
ErrorCode
.
LOB_CLOSED_ON_TIMEOUT_1
,
lob
.
getLobId
()
+
"/"
+
lob
.
getTableId
());
lob
.
getLobId
()
+
"/"
+
lob
.
getTableId
());
}
}
throw
DbException
.
throwInternalError
(
"Lob not found: "
+
throw
DbException
.
throwInternalError
(
"Lob not found: "
+
lob
.
getLobId
()
+
"/"
+
lob
.
getTableId
());
lob
.
getLobId
()
+
"/"
+
lob
.
getTableId
());
...
...
h2/src/main/org/h2/table/MetaTable.java
浏览文件 @
b77d4831
...
@@ -1764,11 +1764,11 @@ public class MetaTable extends Table {
...
@@ -1764,11 +1764,11 @@ public class MetaTable extends Table {
// SELECTIVITY INT
// SELECTIVITY INT
Integer
.
toString
(
col
.
getSelectivity
()),
Integer
.
toString
(
col
.
getSelectivity
()),
// CHECK_CONSTRAINT
// CHECK_CONSTRAINT
""
+
col
.
getCheckConstraintSQL
(
session
,
"VALUE"
),
col
.
getCheckConstraintSQL
(
session
,
"VALUE"
),
// REMARKS
// REMARKS
replaceNullWithEmpty
(
dt
.
getComment
()),
replaceNullWithEmpty
(
dt
.
getComment
()),
// SQL
// SQL
""
+
dt
.
getCreateSQL
(),
dt
.
getCreateSQL
(),
// ID
// ID
Integer
.
toString
(
dt
.
getId
())
Integer
.
toString
(
dt
.
getId
())
);
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论