Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
e5b24a3e
提交
e5b24a3e
authored
2月 11, 2013
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Formatting / javadocs.
上级
9b215d2e
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
53 行增加
和
35 行删除
+53
-35
Parser.java
h2/src/main/org/h2/command/Parser.java
+2
-1
Query.java
h2/src/main/org/h2/command/dml/Query.java
+3
-3
Select.java
h2/src/main/org/h2/command/dml/Select.java
+2
-2
CompressLZF.java
h2/src/main/org/h2/compress/CompressLZF.java
+25
-7
ErrorCode.java
h2/src/main/org/h2/constant/ErrorCode.java
+3
-3
MVMap.java
h2/src/main/org/h2/mvstore/MVMap.java
+1
-1
MVStore.java
h2/src/main/org/h2/mvstore/MVStore.java
+2
-1
FilePathNioMem.java
h2/src/main/org/h2/store/fs/FilePathNioMem.java
+3
-3
TestTriggersConstraints.java
h2/src/test/org/h2/test/db/TestTriggersConstraints.java
+1
-1
TestMetaData.java
h2/src/test/org/h2/test/jdbc/TestMetaData.java
+3
-3
TestMVStore.java
h2/src/test/org/h2/test/store/TestMVStore.java
+7
-7
TestUtils.java
h2/src/test/org/h2/test/unit/TestUtils.java
+1
-3
没有找到文件。
h2/src/main/org/h2/command/Parser.java
浏览文件 @
e5b24a3e
...
@@ -884,7 +884,8 @@ public class Parser {
...
@@ -884,7 +884,8 @@ public class Parser {
}
}
boolean
b
=
session
.
getAllowLiterals
();
boolean
b
=
session
.
getAllowLiterals
();
try
{
try
{
// need to temporarily turn this on, in case we are in ALLOW_LITERALS_NUMBERS mode
// need to temporarily enable it, in case we are in
// ALLOW_LITERALS_NUMBERS mode
session
.
setAllowLiterals
(
true
);
session
.
setAllowLiterals
(
true
);
return
prepare
(
session
,
buff
.
toString
(),
paramValues
);
return
prepare
(
session
,
buff
.
toString
(),
paramValues
);
}
finally
{
}
finally
{
...
...
h2/src/main/org/h2/command/dml/Query.java
浏览文件 @
e5b24a3e
h2/src/main/org/h2/command/dml/Select.java
浏览文件 @
e5b24a3e
h2/src/main/org/h2/compress/CompressLZF.java
浏览文件 @
e5b24a3e
...
@@ -251,8 +251,17 @@ public final class CompressLZF implements Compressor {
...
@@ -251,8 +251,17 @@ public final class CompressLZF implements Compressor {
return
outPos
;
return
outPos
;
}
}
public
int
compress
(
ByteBuffer
in
,
int
inLen
,
byte
[]
out
,
int
outPos
)
{
/**
int
inPos
=
0
;
* Compress a number of bytes.
*
* @param in the input data
* @param out the output area
* @param outPos the offset at the output array
* @return the end position
*/
public
int
compress
(
ByteBuffer
in
,
byte
[]
out
,
int
outPos
)
{
int
inPos
=
in
.
position
();
int
inLen
=
in
.
capacity
()
-
inPos
;
if
(
cachedHashTable
==
null
)
{
if
(
cachedHashTable
==
null
)
{
cachedHashTable
=
new
int
[
HASH_SIZE
];
cachedHashTable
=
new
int
[
HASH_SIZE
];
}
}
...
@@ -397,7 +406,16 @@ public final class CompressLZF implements Compressor {
...
@@ -397,7 +406,16 @@ public final class CompressLZF implements Compressor {
}
while
(
outPos
<
outLen
);
}
while
(
outPos
<
outLen
);
}
}
public
void
expand
(
ByteBuffer
in
,
int
inPos
,
int
inLen
,
ByteBuffer
out
,
int
outPos
,
int
outLen
)
{
/**
* Expand a number of compressed bytes.
*
* @param in the compressed data
* @param out the output area
*/
public
static
void
expand
(
ByteBuffer
in
,
ByteBuffer
out
)
{
int
inPos
=
in
.
position
();
int
outPos
=
out
.
position
();
int
outLen
=
out
.
capacity
()
-
outPos
;
// if ((inPos | outPos | outLen) < 0) {
// if ((inPos | outPos | outLen) < 0) {
if
(
inPos
<
0
||
outPos
<
0
||
outLen
<
0
)
{
if
(
inPos
<
0
||
outPos
<
0
||
outLen
<
0
)
{
throw
new
IllegalArgumentException
();
throw
new
IllegalArgumentException
();
...
...
h2/src/main/org/h2/constant/ErrorCode.java
浏览文件 @
e5b24a3e
...
@@ -447,8 +447,8 @@ public class ErrorCode {
...
@@ -447,8 +447,8 @@ public class ErrorCode {
/**
/**
* The error with code <code>90005</code> is thrown when
* The error with code <code>90005</code> is thrown when
* trying to create a trigger and using the combination of SELECT
and FOR EACH ROW,
* trying to create a trigger and using the combination of SELECT
* which we do not support.
*
and FOR EACH ROW,
which we do not support.
*/
*/
public
static
final
int
TRIGGER_SELECT_AND_ROW_BASED_NOT_SUPPORTED
=
90005
;
public
static
final
int
TRIGGER_SELECT_AND_ROW_BASED_NOT_SUPPORTED
=
90005
;
...
...
h2/src/main/org/h2/mvstore/MVMap.java
浏览文件 @
e5b24a3e
h2/src/main/org/h2/mvstore/MVStore.java
浏览文件 @
e5b24a3e
...
@@ -355,7 +355,8 @@ public class MVStore {
...
@@ -355,7 +355,8 @@ public class MVStore {
* It contains the following entries:
* It contains the following entries:
*
*
* <pre>
* <pre>
* map.{name} = {map metadata}
* name.{name} = {mapId}
* map.{mapId} = {map metadata}
* root.{mapId} = {root position}
* root.{mapId} = {root position}
* chunk.{chunkId} = {chunk metadata}
* chunk.{chunkId} = {chunk metadata}
* </pre>
* </pre>
...
...
h2/src/main/org/h2/store/fs/FilePathNioMem.java
浏览文件 @
e5b24a3e
...
@@ -460,7 +460,7 @@ class FileNioMemData {
...
@@ -460,7 +460,7 @@ class FileNioMemData {
ByteBuffer
out
=
ByteBuffer
.
allocateDirect
(
BLOCK_SIZE
);
ByteBuffer
out
=
ByteBuffer
.
allocateDirect
(
BLOCK_SIZE
);
if
(
d
!=
COMPRESSED_EMPTY_BLOCK
)
{
if
(
d
!=
COMPRESSED_EMPTY_BLOCK
)
{
synchronized
(
LZF
)
{
synchronized
(
LZF
)
{
LZF
.
expand
(
d
,
0
,
d
.
capacity
(),
out
,
0
,
BLOCK_SIZE
);
CompressLZF
.
expand
(
d
,
out
);
}
}
}
}
data
[
page
]
=
out
;
data
[
page
]
=
out
;
...
@@ -475,7 +475,7 @@ class FileNioMemData {
...
@@ -475,7 +475,7 @@ class FileNioMemData {
static
void
compress
(
ByteBuffer
[]
data
,
int
page
)
{
static
void
compress
(
ByteBuffer
[]
data
,
int
page
)
{
ByteBuffer
d
=
data
[
page
];
ByteBuffer
d
=
data
[
page
];
synchronized
(
LZF
)
{
synchronized
(
LZF
)
{
int
len
=
LZF
.
compress
(
d
,
B
LOCK_SIZE
,
B
UFFER
,
0
);
int
len
=
LZF
.
compress
(
d
,
BUFFER
,
0
);
d
=
ByteBuffer
.
allocateDirect
(
len
);
d
=
ByteBuffer
.
allocateDirect
(
len
);
d
.
put
(
BUFFER
,
0
,
len
);
d
.
put
(
BUFFER
,
0
,
len
);
data
[
page
]
=
d
;
data
[
page
]
=
d
;
...
@@ -516,7 +516,7 @@ class FileNioMemData {
...
@@ -516,7 +516,7 @@ class FileNioMemData {
expand
(
data
,
lastPage
);
expand
(
data
,
lastPage
);
ByteBuffer
d
=
data
[
lastPage
];
ByteBuffer
d
=
data
[
lastPage
];
for
(
int
i
=
(
int
)
(
newLength
&
BLOCK_SIZE_MASK
);
i
<
BLOCK_SIZE
;
i
++)
{
for
(
int
i
=
(
int
)
(
newLength
&
BLOCK_SIZE_MASK
);
i
<
BLOCK_SIZE
;
i
++)
{
d
.
put
(
i
,
(
byte
)
0
);
d
.
put
(
i
,
(
byte
)
0
);
}
}
if
(
compress
)
{
if
(
compress
)
{
compressLater
(
data
,
lastPage
);
compressLater
(
data
,
lastPage
);
...
...
h2/src/test/org/h2/test/db/TestTriggersConstraints.java
浏览文件 @
e5b24a3e
h2/src/test/org/h2/test/jdbc/TestMetaData.java
浏览文件 @
e5b24a3e
h2/src/test/org/h2/test/store/TestMVStore.java
浏览文件 @
e5b24a3e
h2/src/test/org/h2/test/unit/TestUtils.java
浏览文件 @
e5b24a3e
...
@@ -16,7 +16,6 @@ import java.util.Date;
...
@@ -16,7 +16,6 @@ import java.util.Date;
import
java.util.Random
;
import
java.util.Random
;
import
org.h2.test.TestBase
;
import
org.h2.test.TestBase
;
import
org.h2.util.Utils
;
import
org.h2.util.Utils
;
import
org.junit.Test
;
/**
/**
* Tests reflection utilities.
* Tests reflection utilities.
...
@@ -37,7 +36,6 @@ public class TestUtils extends TestBase {
...
@@ -37,7 +36,6 @@ public class TestUtils extends TestBase {
TestBase
.
createCaller
().
init
().
test
();
TestBase
.
createCaller
().
init
().
test
();
}
}
@Test
public
void
test
()
throws
Exception
{
public
void
test
()
throws
Exception
{
testSortTopN
();
testSortTopN
();
testSortTopNRandom
();
testSortTopNRandom
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论