Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
dc31cd5f
提交
dc31cd5f
authored
11月 15, 2015
作者:
S.Vladykin
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/h2database/h2database
into row
上级
73fb3c04
f4ee562c
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
52 行增加
和
22 行删除
+52
-22
changelog.html
h2/src/docsrc/html/changelog.html
+2
-0
faq.html
h2/src/docsrc/html/faq.html
+1
-2
SysProperties.java
h2/src/main/org/h2/engine/SysProperties.java
+1
-1
WriteBuffer.java
h2/src/main/org/h2/mvstore/WriteBuffer.java
+20
-2
TcpServerThread.java
h2/src/main/org/h2/server/TcpServerThread.java
+1
-0
ToChar.java
h2/src/main/org/h2/util/ToChar.java
+12
-13
BinaryArithmeticStream.java
h2/src/tools/org/h2/dev/util/BinaryArithmeticStream.java
+4
-4
BitStream.java
h2/src/tools/org/h2/dev/util/BitStream.java
+11
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
dc31cd5f
...
@@ -21,6 +21,8 @@ Change Log
...
@@ -21,6 +21,8 @@ Change Log
<h2>
Next Version (unreleased)
</h2>
<h2>
Next Version (unreleased)
</h2>
<ul>
<ul>
<li>
Server mode: executing "shutdown" left a thread on the server.
</li>
<li>
The condition "in(select...)" did not work correctly in some cases if the subquery had an "order by".
<li>
The condition "in(select...)" did not work correctly in some cases if the subquery had an "order by".
</li>
</li>
<li>
Issue #184: The Platform-independent zip had Windows line endings in Linux scripts.
<li>
Issue #184: The Platform-independent zip had Windows line endings in Linux scripts.
...
...
h2/src/docsrc/html/faq.html
浏览文件 @
dc31cd5f
...
@@ -177,10 +177,9 @@ When using one of the following features for production, please ensure your use
...
@@ -177,10 +177,9 @@ When using one of the following features for production, please ensure your use
is well tested (if possible with automated test cases). The areas that are not well tested are:
is well tested (if possible with automated test cases). The areas that are not well tested are:
</p>
</p>
<ul>
<ul>
<li>
Platforms other than Windows
XP, Linux, Mac OS X, or JVMs other than Sun 1.6 or 1.7
<li>
Platforms other than Windows
, Linux, Mac OS X, or JVMs other than Oracle 1.6, 1.7, 1.8.
</li><li>
The features
<code>
AUTO_SERVER
</code>
and
<code>
AUTO_RECONNECT
</code>
.
</li><li>
The features
<code>
AUTO_SERVER
</code>
and
<code>
AUTO_RECONNECT
</code>
.
</li><li>
Cluster mode, 2-phase commit, savepoints.
</li><li>
Cluster mode, 2-phase commit, savepoints.
</li><li>
24/7 operation.
</li><li>
Fulltext search.
</li><li>
Fulltext search.
</li><li>
Operations on LOBs over 2 GB.
</li><li>
Operations on LOBs over 2 GB.
</li><li>
The optimizer may not always select the best plan.
</li><li>
The optimizer may not always select the best plan.
...
...
h2/src/main/org/h2/engine/SysProperties.java
浏览文件 @
dc31cd5f
...
@@ -122,7 +122,7 @@ public class SysProperties {
...
@@ -122,7 +122,7 @@ public class SysProperties {
//*/
//*/
/**
/**
* System property <code>h2.check2</code> (default:
tru
e).<br />
* System property <code>h2.check2</code> (default:
fals
e).<br />
* Additional assertions in the database engine.
* Additional assertions in the database engine.
*/
*/
//## CHECK ##
//## CHECK ##
...
...
h2/src/main/org/h2/mvstore/WriteBuffer.java
浏览文件 @
dc31cd5f
...
@@ -12,6 +12,9 @@ import java.nio.ByteBuffer;
...
@@ -12,6 +12,9 @@ import java.nio.ByteBuffer;
*/
*/
public
class
WriteBuffer
{
public
class
WriteBuffer
{
/**
* The maximum size of the buffer in order to be re-used after a clear operation.
*/
private
static
final
int
MAX_REUSE_CAPACITY
=
4
*
1024
*
1024
;
private
static
final
int
MAX_REUSE_CAPACITY
=
4
*
1024
*
1024
;
/**
/**
...
@@ -19,9 +22,24 @@ public class WriteBuffer {
...
@@ -19,9 +22,24 @@ public class WriteBuffer {
*/
*/
private
static
final
int
MIN_GROW
=
1024
*
1024
;
private
static
final
int
MIN_GROW
=
1024
*
1024
;
private
ByteBuffer
reuse
=
ByteBuffer
.
allocate
(
MIN_GROW
);
/**
* The buffer that is used after a clear operation.
*/
private
ByteBuffer
reuse
;
private
ByteBuffer
buff
=
reuse
;
/**
* The current buffer (may be replaced if it is too small).
*/
private
ByteBuffer
buff
;
public
WriteBuffer
(
int
initialSize
)
{
reuse
=
ByteBuffer
.
allocate
(
initialSize
);
buff
=
reuse
;
}
public
WriteBuffer
()
{
this
(
MIN_GROW
);
}
/**
/**
* Write a variable size integer.
* Write a variable size integer.
...
...
h2/src/main/org/h2/server/TcpServerThread.java
浏览文件 @
dc31cd5f
...
@@ -347,6 +347,7 @@ public class TcpServerThread implements Runnable {
...
@@ -347,6 +347,7 @@ public class TcpServerThread implements Runnable {
int
status
;
int
status
;
if
(
session
.
isClosed
())
{
if
(
session
.
isClosed
())
{
status
=
SessionRemote
.
STATUS_CLOSED
;
status
=
SessionRemote
.
STATUS_CLOSED
;
stop
=
true
;
}
else
{
}
else
{
status
=
getState
(
old
);
status
=
getState
(
old
);
}
}
...
...
h2/src/main/org/h2/util/ToChar.java
浏览文件 @
dc31cd5f
...
@@ -332,7 +332,9 @@ public class ToChar {
...
@@ -332,7 +332,9 @@ public class ToChar {
private
static
String
zeroesAfterDecimalSeparator
(
BigDecimal
number
)
{
private
static
String
zeroesAfterDecimalSeparator
(
BigDecimal
number
)
{
final
String
numberStr
=
number
.
toString
();
final
String
numberStr
=
number
.
toString
();
final
int
idx
=
numberStr
.
indexOf
(
'.'
);
final
int
idx
=
numberStr
.
indexOf
(
'.'
);
if
(
idx
>=
0
)
{
if
(
idx
<
0
)
{
return
""
;
}
int
i
=
idx
+
1
;
int
i
=
idx
+
1
;
boolean
allZeroes
=
true
;
boolean
allZeroes
=
true
;
for
(;
i
<
numberStr
.
length
();
i
++)
{
for
(;
i
<
numberStr
.
length
();
i
++)
{
...
@@ -344,9 +346,6 @@ public class ToChar {
...
@@ -344,9 +346,6 @@ public class ToChar {
final
char
[]
zeroes
=
new
char
[
allZeroes
?
numberStr
.
length
()
-
idx
-
1
:
i
-
1
-
idx
];
final
char
[]
zeroes
=
new
char
[
allZeroes
?
numberStr
.
length
()
-
idx
-
1
:
i
-
1
-
idx
];
Arrays
.
fill
(
zeroes
,
'0'
);
Arrays
.
fill
(
zeroes
,
'0'
);
return
String
.
valueOf
(
zeroes
);
return
String
.
valueOf
(
zeroes
);
}
else
{
return
""
;
}
}
}
private
static
void
addSign
(
StringBuilder
output
,
int
signum
,
private
static
void
addSign
(
StringBuilder
output
,
int
signum
,
...
...
h2/src/tools/org/h2/dev/util/BinaryArithmeticStream.java
浏览文件 @
dc31cd5f
...
@@ -203,8 +203,8 @@ public class BinaryArithmeticStream {
...
@@ -203,8 +203,8 @@ public class BinaryArithmeticStream {
Node
n
=
tree
;
Node
n
=
tree
;
for
(
int
i
=
bitCount
;
i
>=
0
;
i
--)
{
for
(
int
i
=
bitCount
;
i
>=
0
;
i
--)
{
boolean
goRight
=
((
code
>>
i
)
&
1
)
==
1
;
boolean
goRight
=
((
code
>>
i
)
&
1
)
==
1
;
int
prob
=
MAX_PROBABILITY
*
int
prob
=
(
int
)
((
long
)
MAX_PROBABILITY
*
n
.
right
.
frequency
/
n
.
frequency
;
n
.
right
.
frequency
/
n
.
frequency
)
;
out
.
writeBit
(
goRight
,
prob
);
out
.
writeBit
(
goRight
,
prob
);
n
=
goRight
?
n
.
right
:
n
.
left
;
n
=
goRight
?
n
.
right
:
n
.
left
;
}
}
...
@@ -219,8 +219,8 @@ public class BinaryArithmeticStream {
...
@@ -219,8 +219,8 @@ public class BinaryArithmeticStream {
public
int
read
(
In
in
)
throws
IOException
{
public
int
read
(
In
in
)
throws
IOException
{
Node
n
=
tree
;
Node
n
=
tree
;
while
(
n
.
left
!=
null
)
{
while
(
n
.
left
!=
null
)
{
int
prob
=
MAX_PROBABILITY
*
int
prob
=
(
int
)
((
long
)
MAX_PROBABILITY
*
n
.
right
.
frequency
/
n
.
frequency
;
n
.
right
.
frequency
/
n
.
frequency
)
;
boolean
goRight
=
in
.
readBit
(
prob
);
boolean
goRight
=
in
.
readBit
(
prob
);
n
=
goRight
?
n
.
right
:
n
.
left
;
n
=
goRight
?
n
.
right
:
n
.
left
;
}
}
...
...
h2/src/tools/org/h2/dev/util/BitStream.java
浏览文件 @
dc31cd5f
...
@@ -245,6 +245,17 @@ public class BitStream {
...
@@ -245,6 +245,17 @@ public class BitStream {
return
n
.
value
;
return
n
.
value
;
}
}
/**
* Get the number of bits of the Huffman code for this value.
*
* @param value the value
* @return the number of bits
*/
public
int
getBitCount
(
int
value
)
{
int
code
=
codes
[
value
];
return
30
-
Integer
.
numberOfLeadingZeros
(
code
);
}
}
}
/**
/**
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论