Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
fd77253c
提交
fd77253c
authored
3月 31, 2014
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changes for version 1.4.x beta
上级
00ec767c
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
53 行增加
和
32 行删除
+53
-32
help.csv
h2/src/docsrc/help/help.csv
+2
-1
changelog.html
h2/src/docsrc/html/changelog.html
+22
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+2
-12
Parser.java
h2/src/main/org/h2/command/Parser.java
+5
-2
Mode.java
h2/src/main/org/h2/engine/Mode.java
+1
-1
SysProperties.java
h2/src/main/org/h2/engine/SysProperties.java
+13
-8
ObjectDataType.java
h2/src/main/org/h2/mvstore/type/ObjectDataType.java
+1
-1
CreateCluster.java
h2/src/main/org/h2/tools/CreateCluster.java
+1
-1
RunScript.java
h2/src/main/org/h2/tools/RunScript.java
+1
-1
Script.java
h2/src/main/org/h2/tools/Script.java
+1
-1
Shell.java
h2/src/main/org/h2/tools/Shell.java
+1
-1
ToChar.java
h2/src/main/org/h2/util/ToChar.java
+3
-2
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
fd77253c
...
...
@@ -2146,7 +2146,8 @@ Each table has a pseudo-column named ""_ROWID_"" that contains the unique row id
"Other Grammar","Time","
TIME 'hh:mm:ss'
","
A time literal.
A time literal. A value is between plus and minus 2 million hours
and has nanosecond resolution.
","
TIME '23:59:59'
"
...
...
h2/src/docsrc/html/changelog.html
浏览文件 @
fd77253c
...
...
@@ -17,8 +17,29 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Changes in Version 1.4 Beta (unreleased)
</h2>
<ul><li>
Enable the new storage format for dates (system property "h2.storeLocalTime").
For the MVStore mode, this is always enabled, but with version 1.4
this is even enabled in the PageStore mode.
</li><li>
Implicit relative paths are disabled (system property "h2.implicitRelativePath"),
so that the database URL jdbc:h2:test now needs to be written as jdbc:h2:./test.
</li><li>
"select ... fetch first 1 row only" is supported with the regular mode.
This was disabled so far because "fetch" is now a keyword.
See also Mode.supportOffsetFetch.
</li><li>
Byte arrays are now sorted in unsigned mode
(x'99' is larger than x'09').
(System property "h2.sortBinaryUnsigned", Mode.binaryUnsigned).
</li><li>
Csv.getInstance will be removed in future versions of 1.4.
Use the public constructor instead.
</li><li>
Remove support for the limited old-style outer join syntax using "(+)".
Use "outer join" instead.
System property "h2.oldStyleOuterJoin".
</li></ul>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
The stack trace of the exception "The object is already closed" is no longer logged by default.
<ul><li>
The default user name for the Script, RunScript, Shell,
and CreateCluster tools are no longer "sa" but an empty string.
</li><li>
The stack trace of the exception "The object is already closed" is no longer logged by default.
</li><li>
If a value of a result set was itself a result set, the result
could only be read once.
</li><li>
Column constraints are also visible in views (patch from Nicolas Fortin for H2GIS).
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
fd77253c
...
...
@@ -28,20 +28,10 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li></ul>
<h2>
Version 1.4.x: Planned Changes
</h2>
<ul><li>
Build the jar file for Java 6 by default (JDBC API 4.1).
</li><li>
Enable the new storage format for dates (system property "h2.storeLocalTime").
Document time literals: between minus 2 million and 2 million hours with nanosecond resolution.
</li><li>
Remove the old connection pool logic (system property "h2.fastConnectionPool").
</li><li>
Disable implicit relative paths (system property "h2.implicitRelativePath").
</li><li>
Enable Mode.supportOffsetFetch by default, so that "select 1 fetch first 1 row only" works.
</li><li>
Whether byte arrays should be sorted in unsigned mode
(old behavior: x'99' is smaller than x'09').
(System property "h2.sortBinaryUnsigned", Mode.binaryUnsigned).
</li><li>
The default user name should be an empty string and not "sa".
</li><li>
Deprecate Csv.getInstance() (use the public constructor instead).
</li><li>
Remove support for the old-style outer join syntax using "(+)" because it is buggy.
<ul><li>
Remove Csv.getInstance().
</li><li>
Change license to MPL 2.0.
</li><li>
Document that FILE_LOCK=SERIALIZED is not supported with the MVStore mode.
</li><li>
Use the MVStore with MVCC by default.
</li></ul>
<h2>
Priority 1
</h2>
...
...
h2/src/main/org/h2/command/Parser.java
浏览文件 @
fd77253c
...
...
@@ -90,6 +90,7 @@ import org.h2.engine.FunctionAlias;
import
org.h2.engine.Procedure
;
import
org.h2.engine.Right
;
import
org.h2.engine.Session
;
import
org.h2.engine.SysProperties
;
import
org.h2.engine.User
;
import
org.h2.engine.UserAggregate
;
import
org.h2.engine.UserDataType
;
...
...
@@ -2152,7 +2153,7 @@ public class Parser {
read
(
")"
);
}
else
{
Expression
right
=
readConcat
();
if
(
readIf
(
"("
)
&&
readIf
(
"+"
)
&&
readIf
(
")"
))
{
if
(
SysProperties
.
OLD_STYLE_OUTER_JOIN
&&
readIf
(
"("
)
&&
readIf
(
"+"
)
&&
readIf
(
")"
))
{
// support for a subset of old-fashioned Oracle outer
// join with (+)
if
(
r
instanceof
ExpressionColumn
&&
...
...
@@ -2576,10 +2577,12 @@ public class Parser {
}
String
name
=
readColumnIdentifier
();
Schema
s
=
database
.
findSchema
(
objectName
);
if
(
s
!=
null
&&
readIf
(
"("
))
{
if
(
(
SysProperties
.
OLD_STYLE_OUTER_JOIN
&&
s
!=
null
)
&&
readIf
(
"("
))
{
// only if the token before the dot is a valid schema name,
// otherwise the old style Oracle outer join doesn't work:
// t.x = t2.x(+)
// this additional check is not required if the old style outer joins
// are not supported
return
readFunction
(
s
,
name
);
}
else
if
(
readIf
(
"."
))
{
String
schema
=
objectName
;
...
...
h2/src/main/org/h2/engine/Mode.java
浏览文件 @
fd77253c
...
...
@@ -78,7 +78,7 @@ public class Mode {
* [OFFSET .. ROW|ROWS] [FETCH FIRST .. ROW|ROWS ONLY]
* as an alternative for LIMIT .. OFFSET.
*/
public
boolean
supportOffsetFetch
;
public
boolean
supportOffsetFetch
=
Constants
.
VERSION_MINOR
>=
4
?
true
:
false
;
/**
* The system columns 'CTID' and 'OID' are supported.
...
...
h2/src/main/org/h2/engine/SysProperties.java
浏览文件 @
fd77253c
...
...
@@ -311,6 +311,13 @@ public class SysProperties {
*/
public
static
final
int
OBJECT_CACHE_SIZE
=
MathUtils
.
nextPowerOf2
(
Utils
.
getProperty
(
"h2.objectCacheSize"
,
1024
));
/**
* System property <code>h2.oldStyleOuterJoin</code> (default: true for version 1.3, false for version 1.4).<br />
* Limited support for the old-style Oracle outer join with "(+)".
*/
public
static
final
boolean
OLD_STYLE_OUTER_JOIN
=
Utils
.
getProperty
(
"h2.oldStyleOuterJoin"
,
Constants
.
VERSION_MINOR
>=
4
?
false
:
true
);
/**
* System property <code>h2.pgClientEncoding</code> (default: UTF-8).<br />
...
...
@@ -360,12 +367,11 @@ public class SysProperties {
Utils
.
getProperty
(
"h2.socketConnectTimeout"
,
2000
);
/**
* System property <code>h2.sortBinaryUnsigned</code> (default: false).<br />
* System property <code>h2.sortBinaryUnsigned</code> (default: false
with version 1.3, true with version 1.4
).<br />
* Whether binary data should be sorted in unsigned mode (0xff is larger than 0x00).
*/
;
public
static
final
boolean
SORT_BINARY_UNSIGNED
=
Utils
.
getProperty
(
"h2.sortBinaryUnsigned"
,
false
);
Utils
.
getProperty
(
"h2.sortBinaryUnsigned"
,
Constants
.
VERSION_MINOR
>=
4
?
true
:
false
);
/**
* System property <code>h2.sortNullsHigh</code> (default: false).<br />
...
...
@@ -384,12 +390,12 @@ public class SysProperties {
Utils
.
getProperty
(
"h2.splitFileSizeShift"
,
30
);
/**
* System property <code>h2.storeLocalTime</code> (default: false).<br />
* System property <code>h2.storeLocalTime</code> (default: false
for version 1.3, true for version 1.4
).<br />
* Store the local time. If disabled, the daylight saving offset is not
* taken into account.
*/
public
static
final
boolean
STORE_LOCAL_TIME
=
Utils
.
getProperty
(
"h2.storeLocalTime"
,
false
);
Utils
.
getProperty
(
"h2.storeLocalTime"
,
Constants
.
VERSION_MINOR
>=
4
?
true
:
false
);
/**
* System property <code>h2.syncMethod</code> (default: sync).<br />
...
...
@@ -412,13 +418,12 @@ public class SysProperties {
Utils
.
getProperty
(
"h2.traceIO"
,
false
);
/**
* System property <code>h2.implicitRelativePath</code> (default: true).<br />
* System property <code>h2.implicitRelativePath</code> (default: true
for version 1.3, false for version 1.4
).<br />
* If disabled, relative paths in database URLs need to be written as
* jdbc:h2:./test instead of jdbc:h2:test.
*/
;
public
static
final
boolean
IMPLICIT_RELATIVE_PATH
=
Utils
.
getProperty
(
"h2.implicitRelativePath"
,
fals
e
);
Utils
.
getProperty
(
"h2.implicitRelativePath"
,
Constants
.
VERSION_MINOR
>=
4
?
false
:
tru
e
);
/**
* System property <code>h2.urlMap</code> (default: null).<br />
...
...
h2/src/main/org/h2/mvstore/type/ObjectDataType.java
浏览文件 @
fd77253c
...
...
@@ -405,7 +405,7 @@ public class ObjectDataType implements DataType {
/**
* The base class for auto-detect data types.
*/
static
abstract
class
AutoDetectDataType
implements
DataType
{
abstract
static
class
AutoDetectDataType
implements
DataType
{
protected
final
ObjectDataType
base
;
protected
final
int
typeId
;
...
...
h2/src/main/org/h2/tools/CreateCluster.java
浏览文件 @
fd77253c
...
...
@@ -57,7 +57,7 @@ public class CreateCluster extends Tool {
public
void
runTool
(
String
...
args
)
throws
SQLException
{
String
urlSource
=
null
;
String
urlTarget
=
null
;
String
user
=
"
sa
"
;
String
user
=
""
;
String
password
=
""
;
String
serverList
=
null
;
for
(
int
i
=
0
;
args
!=
null
&&
i
<
args
.
length
;
i
++)
{
...
...
h2/src/main/org/h2/tools/RunScript.java
浏览文件 @
fd77253c
...
...
@@ -90,7 +90,7 @@ public class RunScript extends Tool {
@Override
public
void
runTool
(
String
...
args
)
throws
SQLException
{
String
url
=
null
;
String
user
=
"
sa
"
;
String
user
=
""
;
String
password
=
""
;
String
script
=
"backup.sql"
;
String
options
=
null
;
...
...
h2/src/main/org/h2/tools/Script.java
浏览文件 @
fd77253c
...
...
@@ -56,7 +56,7 @@ public class Script extends Tool {
@Override
public
void
runTool
(
String
...
args
)
throws
SQLException
{
String
url
=
null
;
String
user
=
"
sa
"
;
String
user
=
""
;
String
password
=
""
;
String
file
=
"backup.sql"
;
String
options1
=
null
,
options2
=
null
;
...
...
h2/src/main/org/h2/tools/Shell.java
浏览文件 @
fd77253c
...
...
@@ -320,7 +320,7 @@ public class Shell extends Tool implements Runnable {
private
void
connect
()
throws
IOException
,
SQLException
{
String
url
=
"jdbc:h2:~/test"
;
String
user
=
"
sa
"
;
String
user
=
""
;
String
driver
=
null
;
try
{
Properties
prop
;
...
...
h2/src/main/org/h2/util/ToChar.java
浏览文件 @
fd77253c
...
...
@@ -630,7 +630,8 @@ public class ToChar {
output
.
append
(
cal
.
get
(
Calendar
.
DAY_OF_YEAR
));
i
+=
3
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"DD"
))
!=
null
)
{
output
.
append
(
String
.
format
(
"%02d"
,
cal
.
get
(
Calendar
.
DAY_OF_MONTH
)));
output
.
append
(
String
.
format
(
"%02d"
,
cal
.
get
(
Calendar
.
DAY_OF_MONTH
)));
i
+=
2
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"DY"
))
!=
null
)
{
String
day
=
new
SimpleDateFormat
(
"EEE"
).
format
(
ts
).
toUpperCase
();
...
...
@@ -754,7 +755,7 @@ public class ToChar {
output
.
append
(
cap
.
apply
(
month
));
i
+=
3
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"MM"
))
!=
null
)
{
output
.
append
(
String
.
format
(
"%02d"
,
cal
.
get
(
Calendar
.
MONTH
)
+
1
));
output
.
append
(
String
.
format
(
"%02d"
,
cal
.
get
(
Calendar
.
MONTH
)
+
1
));
i
+=
2
;
}
else
if
((
cap
=
containsAt
(
format
,
i
,
"RM"
))
!=
null
)
{
int
month
=
cal
.
get
(
Calendar
.
MONTH
)
+
1
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论