Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
0f76639b
提交
0f76639b
authored
7 年前
作者:
Noel Grandin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove some dead code
上级
abd6e502
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
0 行增加
和
94 行删除
+0
-94
DropSynonym.java
h2/src/main/org/h2/command/ddl/DropSynonym.java
+0
-3
DataUtils.java
h2/src/main/org/h2/mvstore/DataUtils.java
+0
-13
MVMap.java
h2/src/main/org/h2/mvstore/MVMap.java
+0
-42
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+0
-11
Page.java
h2/src/main/org/h2/mvstore/Page.java
+0
-14
MVPrimaryIndex.java
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
+0
-5
TransactionStore.java
h2/src/main/org/h2/mvstore/db/TransactionStore.java
+0
-4
TestMvccMultiThreaded2.java
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded2.java
+0
-1
FilePathReorderWrites.java
h2/src/test/org/h2/test/utils/FilePathReorderWrites.java
+0
-1
没有找到文件。
h2/src/main/org/h2/command/ddl/DropSynonym.java
浏览文件 @
0f76639b
...
@@ -7,13 +7,10 @@ package org.h2.command.ddl;
...
@@ -7,13 +7,10 @@ package org.h2.command.ddl;
import
org.h2.api.ErrorCode
;
import
org.h2.api.ErrorCode
;
import
org.h2.command.CommandInterface
;
import
org.h2.command.CommandInterface
;
import
org.h2.engine.Right
;
import
org.h2.engine.Session
;
import
org.h2.engine.Session
;
import
org.h2.message.DbException
;
import
org.h2.message.DbException
;
import
org.h2.schema.Schema
;
import
org.h2.schema.Schema
;
import
org.h2.table.Table
;
import
org.h2.table.TableSynonym
;
import
org.h2.table.TableSynonym
;
import
org.h2.table.TableType
;
/**
/**
* This class represents the statement
* This class represents the statement
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/DataUtils.java
浏览文件 @
0f76639b
...
@@ -14,10 +14,8 @@ import java.nio.charset.Charset;
...
@@ -14,10 +14,8 @@ import java.nio.charset.Charset;
import
java.text.MessageFormat
;
import
java.text.MessageFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.ConcurrentModificationException
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
org.h2.engine.Constants
;
import
org.h2.engine.Constants
;
import
org.h2.util.New
;
import
org.h2.util.New
;
...
@@ -741,17 +739,6 @@ public class DataUtils {
...
@@ -741,17 +739,6 @@ public class DataUtils {
return
new
UnsupportedOperationException
(
formatMessage
(
0
,
message
));
return
new
UnsupportedOperationException
(
formatMessage
(
0
,
message
));
}
}
/**
* Create a new ConcurrentModificationException.
*
* @param message the message
* @return the exception
*/
public
static
ConcurrentModificationException
newConcurrentModificationException
(
String
message
)
{
return
new
ConcurrentModificationException
(
formatMessage
(
0
,
message
));
}
/**
/**
* Create a new IllegalStateException.
* Create a new IllegalStateException.
*
*
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/MVMap.java
浏览文件 @
0f76639b
...
@@ -14,7 +14,6 @@ import java.util.List;
...
@@ -14,7 +14,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.ConcurrentMap
;
import
org.h2.mvstore.type.DataType
;
import
org.h2.mvstore.type.DataType
;
import
org.h2.mvstore.type.ObjectDataType
;
import
org.h2.mvstore.type.ObjectDataType
;
import
org.h2.util.New
;
import
org.h2.util.New
;
...
@@ -128,23 +127,6 @@ public class MVMap<K, V> extends AbstractMap<K, V>
...
@@ -128,23 +127,6 @@ public class MVMap<K, V> extends AbstractMap<K, V>
return
(
V
)
result
;
return
(
V
)
result
;
}
}
/**
* Add or replace a key-value pair in a branch.
*
* @param root the root page
* @param key the key (may not be null)
* @param value the value (may not be null)
* @return the new root page
*/
synchronized
Page
putBranch
(
Page
root
,
K
key
,
V
value
)
{
DataUtils
.
checkArgument
(
value
!=
null
,
"The value may not be null"
);
long
v
=
writeVersion
;
Page
p
=
root
.
copy
(
v
);
p
=
splitRootIfNeeded
(
p
,
v
);
put
(
p
,
v
,
key
,
value
);
return
p
;
}
/**
/**
* Split the root page if necessary.
* Split the root page if necessary.
*
*
...
@@ -484,30 +466,6 @@ public class MVMap<K, V> extends AbstractMap<K, V>
...
@@ -484,30 +466,6 @@ public class MVMap<K, V> extends AbstractMap<K, V>
return
get
(
key
)
!=
null
;
return
get
(
key
)
!=
null
;
}
}
/**
* Get the value for the given key, or null if not found.
*
* @param p the parent page
* @param key the key
* @return the page or null
*/
protected
Page
binarySearchPage
(
Page
p
,
Object
key
)
{
int
x
=
p
.
binarySearch
(
key
);
if
(!
p
.
isLeaf
())
{
if
(
x
<
0
)
{
x
=
-
x
-
1
;
}
else
{
x
++;
}
p
=
p
.
getChildPage
(
x
);
return
binarySearchPage
(
p
,
key
);
}
if
(
x
>=
0
)
{
return
p
;
}
return
null
;
}
/**
/**
* Remove all entries.
* Remove all entries.
*/
*/
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
0f76639b
...
@@ -916,17 +916,6 @@ public final class MVStore {
...
@@ -916,17 +916,6 @@ public final class MVStore {
}
}
}
}
/**
* Whether the chunk at the given position is live.
*
* @param chunkId the chunk id
* @return true if it is live
*/
boolean
isChunkLive
(
int
chunkId
)
{
String
s
=
meta
.
get
(
Chunk
.
getMetaKey
(
chunkId
));
return
s
!=
null
;
}
/**
/**
* Get the chunk for the given position.
* Get the chunk for the given position.
*
*
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/Page.java
浏览文件 @
0f76639b
...
@@ -7,8 +7,6 @@ package org.h2.mvstore;
...
@@ -7,8 +7,6 @@ package org.h2.mvstore;
import
java.nio.ByteBuffer
;
import
java.nio.ByteBuffer
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.Set
;
import
org.h2.compress.Compressor
;
import
org.h2.compress.Compressor
;
import
org.h2.mvstore.type.DataType
;
import
org.h2.mvstore.type.DataType
;
import
org.h2.util.New
;
import
org.h2.util.New
;
...
@@ -1121,18 +1119,6 @@ public class Page {
...
@@ -1121,18 +1119,6 @@ public class Page {
}
}
}
}
/**
* Collect the set of chunks referenced directly by this page.
*
* @param target the target set
*/
void
collectReferencedChunks
(
Set
<
Integer
>
target
)
{
target
.
add
(
DataUtils
.
getPageChunkId
(
pos
));
for
(
long
p
:
children
)
{
target
.
add
(
DataUtils
.
getPageChunkId
(
p
));
}
}
private
void
removeChild
(
int
index
)
{
private
void
removeChild
(
int
index
)
{
if
(
index
==
0
&&
children
.
length
==
1
)
{
if
(
index
==
0
&&
children
.
length
==
1
)
{
children
=
EMPTY_ARRAY
;
children
=
EMPTY_ARRAY
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/db/MVPrimaryIndex.java
浏览文件 @
0f76639b
...
@@ -48,11 +48,6 @@ public class MVPrimaryIndex extends BaseIndex {
...
@@ -48,11 +48,6 @@ public class MVPrimaryIndex extends BaseIndex {
*/
*/
static
final
ValueLong
MAX
=
ValueLong
.
get
(
Long
.
MAX_VALUE
);
static
final
ValueLong
MAX
=
ValueLong
.
get
(
Long
.
MAX_VALUE
);
/**
* The zero long value.
*/
static
final
ValueLong
ZERO
=
ValueLong
.
get
(
0
);
private
final
MVTable
mvTable
;
private
final
MVTable
mvTable
;
private
final
String
mapName
;
private
final
String
mapName
;
private
TransactionMap
<
Value
,
Value
>
dataMap
;
private
TransactionMap
<
Value
,
Value
>
dataMap
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/mvstore/db/TransactionStore.java
浏览文件 @
0f76639b
...
@@ -1239,10 +1239,6 @@ public class TransactionStore {
...
@@ -1239,10 +1239,6 @@ public class TransactionStore {
}
}
}
}
Object
getUndoLog
()
{
return
transaction
.
store
.
undoLog
;
}
/**
/**
* Get the versioned value for the given key.
* Get the versioned value for the given key.
*
*
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/mvcc/TestMvccMultiThreaded2.java
浏览文件 @
0f76639b
...
@@ -11,7 +11,6 @@ import java.sql.ResultSet;
...
@@ -11,7 +11,6 @@ import java.sql.ResultSet;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.sql.Statement
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
org.h2.api.ErrorCode
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.jdbc.JdbcSQLException
;
import
org.h2.test.TestBase
;
import
org.h2.test.TestBase
;
import
org.h2.util.IOUtils
;
import
org.h2.util.IOUtils
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/utils/FilePathReorderWrites.java
浏览文件 @
0f76639b
...
@@ -274,7 +274,6 @@ class FileReorderWrites extends FileBase {
...
@@ -274,7 +274,6 @@ class FileReorderWrites extends FileBase {
@Override
@Override
public
int
write
(
ByteBuffer
src
,
long
position
)
throws
IOException
{
public
int
write
(
ByteBuffer
src
,
long
position
)
throws
IOException
{
if
(
FilePathReorderWrites
.
isPartialWrites
()
&&
src
.
remaining
()
>
2
)
{
if
(
FilePathReorderWrites
.
isPartialWrites
()
&&
src
.
remaining
()
>
2
)
{
final
int
tmp
=
src
.
remaining
();
ByteBuffer
buf1
=
src
.
slice
();
ByteBuffer
buf1
=
src
.
slice
();
ByteBuffer
buf2
=
src
.
slice
();
ByteBuffer
buf2
=
src
.
slice
();
int
len1
=
src
.
remaining
()
/
2
;
int
len1
=
src
.
remaining
()
/
2
;
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论