Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
e4791847
提交
e4791847
authored
9月 06, 2014
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation / formatting
上级
d5006d2b
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
33 行增加
和
8 行删除
+33
-8
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
Driver.java
h2/src/main/org/h2/Driver.java
+3
-2
Parser.java
h2/src/main/org/h2/command/Parser.java
+2
-2
TestPerfectHash.java
h2/src/test/org/h2/test/unit/TestPerfectHash.java
+14
-0
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+5
-1
MinimalPerfectHash.java
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
+8
-2
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
e4791847
...
...
@@ -17,7 +17,7 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
Conditions on the "_rowid_" pseudo-column didn't use an index
<ul><li>
Issue 579:
Conditions on the "_rowid_" pseudo-column didn't use an index
when using the MVStore.
</li><li>
Fixed documentation that "offset" and "fetch" are also keywords since version 1.4.x.
</li><li>
The Long.MIN_VALUE could not be parsed for auto-increment (identity) columns.
...
...
h2/src/main/org/h2/Driver.java
浏览文件 @
e4791847
...
...
@@ -180,7 +180,8 @@ public class Driver implements java.sql.Driver {
/**
* INTERNAL
* Sets, on a per-thread basis, the default-connection for user-defined functions.
* Sets, on a per-thread basis, the default-connection for
* user-defined functions.
*/
public
static
void
setDefaultConnection
(
Connection
c
)
{
if
(
c
==
null
)
{
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
e4791847
...
...
@@ -2986,7 +2986,7 @@ public class Parser {
throw
DbException
.
getSyntaxError
(
sqlCommand
,
parseIndex
,
"integer"
);
}
if
(
minus
)
{
// must do that now, otherwise Integer.MIN_VALUE would
n'
t work
// must do that now, otherwise Integer.MIN_VALUE would
no
t work
currentValue
=
currentValue
.
negate
();
}
int
i
=
currentValue
.
getInt
();
...
...
@@ -3006,7 +3006,7 @@ public class Parser {
throw
DbException
.
getSyntaxError
(
sqlCommand
,
parseIndex
,
"long"
);
}
if
(
minus
)
{
// must do that now, otherwise Long.MIN_VALUE would
n'
t work
// must do that now, otherwise Long.MIN_VALUE would
no
t work
currentValue
=
currentValue
.
negate
();
}
long
i
=
currentValue
.
getLong
();
...
...
h2/src/test/org/h2/test/unit/TestPerfectHash.java
浏览文件 @
e4791847
...
...
@@ -224,7 +224,14 @@ public class TestPerfectHash extends TestBase {
*/
static
class
Text
{
/**
* The byte data (may be shared, so must not be modified).
*/
final
byte
[]
data
;
/**
* The start location.
*/
final
int
start
;
Text
(
byte
[]
data
,
int
start
)
{
...
...
@@ -232,6 +239,13 @@ public class TestPerfectHash extends TestBase {
this
.
start
=
start
;
}
/**
* The hash code (using a universal hash function).
*
* @param index the hash function index
* @param seed the random seed
* @return the hash code
*/
public
int
hashCode
(
int
index
,
int
seed
)
{
if
(
index
<
8
)
{
int
x
=
(
index
*
0x9f3b
)
^
seed
;
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
e4791847
...
...
@@ -762,4 +762,8 @@ exploit noise ongoing disclaimers shrinks remedy party desirable timely construe
deque synchronizers affero kevent nikolaj hohmuth grajcar jens fogh hostnames
operate resized jni yjp ownable starvation reaper biased introduce epoll hangs
compaction aggressive powerful traversing pietrzak michi karl rewriting consequences
linearly patching perfect hole
linearly patching perfect hole sip enwiki
flooding uniformly recursions happening
h2/src/tools/org/h2/dev/hash/MinimalPerfectHash.java
浏览文件 @
e4791847
...
...
@@ -153,6 +153,7 @@ public class MinimalPerfectHash<K> {
* Create a hash object to convert keys to hashes.
*
* @param desc the data returned by the generate method
* @param hash the universal hash function
*/
public
MinimalPerfectHash
(
byte
[]
desc
,
UniversalHash
<
K
>
hash
)
{
this
.
hash
=
hash
;
...
...
@@ -193,7 +194,8 @@ public class MinimalPerfectHash<K> {
}
/**
* Get the hash value for the given key, starting at a certain position and level.
* Get the hash value for the given key, starting at a certain position and
* level.
*
* @param pos the start position
* @param x the key
...
...
@@ -304,6 +306,7 @@ public class MinimalPerfectHash<K> {
* integers.
*
* @param set the data
* @param hash the universal hash function
* @return the hash function description
*/
public
static
<
K
>
byte
[]
generate
(
Set
<
K
>
set
,
UniversalHash
<
K
>
hash
)
{
...
...
@@ -323,7 +326,9 @@ public class MinimalPerfectHash<K> {
* Generate the perfect hash function data from the given set of integers.
*
* @param list the data, in the form of a list
* @param hash the universal hash function
* @param level the recursion level
* @param seed the random seed
* @param out the output stream
*/
static
<
K
>
void
generate
(
ArrayList
<
K
>
list
,
UniversalHash
<
K
>
hash
,
...
...
@@ -477,7 +482,8 @@ public class MinimalPerfectHash<K> {
* @param size the size of the bucket
* @return the hash (a value between 0, including, and the size, excluding)
*/
private
static
<
K
>
int
hash
(
K
o
,
UniversalHash
<
K
>
hash
,
int
level
,
int
seed
,
int
offset
,
int
size
)
{
private
static
<
K
>
int
hash
(
K
o
,
UniversalHash
<
K
>
hash
,
int
level
,
int
seed
,
int
offset
,
int
size
)
{
int
x
=
hash
.
hashCode
(
o
,
level
,
seed
);
x
+=
level
+
offset
*
16
;
x
=
((
x
>>>
16
)
^
x
)
*
0x45d9f3b
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论