Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
40d5af8e
提交
40d5af8e
authored
6月 25, 2011
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The new date conversion is actually also problematic.
上级
cca61783
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
12 行增加
和
31 行删除
+12
-31
Constants.java
h2/src/main/org/h2/engine/Constants.java
+0
-5
SessionRemote.java
h2/src/main/org/h2/engine/SessionRemote.java
+1
-1
TcpServerThread.java
h2/src/main/org/h2/server/TcpServerThread.java
+4
-4
FileLock.java
h2/src/main/org/h2/store/FileLock.java
+1
-1
Transfer.java
h2/src/main/org/h2/value/Transfer.java
+6
-20
没有找到文件。
h2/src/main/org/h2/engine/Constants.java
浏览文件 @
40d5af8e
...
...
@@ -56,11 +56,6 @@ public class Constants {
*/
public
static
final
int
TCP_PROTOCOL_VERSION_8
=
8
;
/**
* The TCP protocol version number 9.
*/
public
static
final
int
TCP_PROTOCOL_VERSION_9
=
9
;
/**
* The major version of this database.
*/
...
...
h2/src/main/org/h2/engine/SessionRemote.java
浏览文件 @
40d5af8e
...
...
@@ -94,7 +94,7 @@ public class SessionRemote extends SessionWithState implements DataHandler {
trans
.
setSSL
(
ci
.
isSSL
());
trans
.
init
();
trans
.
writeInt
(
Constants
.
TCP_PROTOCOL_VERSION_6
);
trans
.
writeInt
(
Constants
.
TCP_PROTOCOL_VERSION_
9
);
trans
.
writeInt
(
Constants
.
TCP_PROTOCOL_VERSION_
8
);
trans
.
writeString
(
db
);
trans
.
writeString
(
ci
.
getOriginalURL
());
trans
.
writeString
(
ci
.
getUserName
());
...
...
h2/src/main/org/h2/server/TcpServerThread.java
浏览文件 @
40d5af8e
...
...
@@ -71,12 +71,12 @@ public class TcpServerThread implements Runnable {
int
minClientVersion
=
transfer
.
readInt
();
if
(
minClientVersion
<
Constants
.
TCP_PROTOCOL_VERSION_6
)
{
throw
DbException
.
get
(
ErrorCode
.
DRIVER_VERSION_ERROR_2
,
""
+
clientVersion
,
""
+
Constants
.
TCP_PROTOCOL_VERSION_6
);
}
else
if
(
minClientVersion
>
Constants
.
TCP_PROTOCOL_VERSION_
9
)
{
throw
DbException
.
get
(
ErrorCode
.
DRIVER_VERSION_ERROR_2
,
""
+
clientVersion
,
""
+
Constants
.
TCP_PROTOCOL_VERSION_
9
);
}
else
if
(
minClientVersion
>
Constants
.
TCP_PROTOCOL_VERSION_
8
)
{
throw
DbException
.
get
(
ErrorCode
.
DRIVER_VERSION_ERROR_2
,
""
+
clientVersion
,
""
+
Constants
.
TCP_PROTOCOL_VERSION_
8
);
}
int
maxClientVersion
=
transfer
.
readInt
();
if
(
maxClientVersion
>=
Constants
.
TCP_PROTOCOL_VERSION_
9
)
{
clientVersion
=
Constants
.
TCP_PROTOCOL_VERSION_
9
;
if
(
maxClientVersion
>=
Constants
.
TCP_PROTOCOL_VERSION_
8
)
{
clientVersion
=
Constants
.
TCP_PROTOCOL_VERSION_
8
;
}
else
{
clientVersion
=
minClientVersion
;
}
...
...
h2/src/main/org/h2/store/FileLock.java
浏览文件 @
40d5af8e
...
...
@@ -230,7 +230,7 @@ public class FileLock implements Runnable {
transfer
.
setSocket
(
socket
);
transfer
.
init
();
transfer
.
writeInt
(
Constants
.
TCP_PROTOCOL_VERSION_6
);
transfer
.
writeInt
(
Constants
.
TCP_PROTOCOL_VERSION_
9
);
transfer
.
writeInt
(
Constants
.
TCP_PROTOCOL_VERSION_
8
);
transfer
.
writeString
(
null
);
transfer
.
writeString
(
null
);
transfer
.
writeString
(
id
);
...
...
h2/src/main/org/h2/value/Transfer.java
浏览文件 @
40d5af8e
...
...
@@ -320,18 +320,14 @@ public class Transfer {
writeByte
(
v
.
getByte
());
break
;
case
Value
.
TIME
:
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_9
)
{
writeLong
(
DateTimeUtils
.
getTimeLocal
(
v
.
getTimeNoCopy
()));
}
else
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
writeLong
(
DateTimeUtils
.
getTimeLocalWithoutDst
(
v
.
getTimeNoCopy
()));
}
else
{
writeLong
(
v
.
getTimeNoCopy
().
getTime
());
}
break
;
case
Value
.
DATE
:
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_9
)
{
writeLong
(
DateTimeUtils
.
getTimeLocal
(
v
.
getDateNoCopy
()));
}
else
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
writeLong
(
DateTimeUtils
.
getTimeLocalWithoutDst
(
v
.
getDateNoCopy
()));
}
else
{
writeLong
(
v
.
getDateNoCopy
().
getTime
());
...
...
@@ -339,9 +335,7 @@ public class Transfer {
break
;
case
Value
.
TIMESTAMP
:
{
Timestamp
ts
=
v
.
getTimestampNoCopy
();
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_9
)
{
writeLong
(
DateTimeUtils
.
getTimeLocal
(
ts
));
}
else
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
writeLong
(
DateTimeUtils
.
getTimeLocalWithoutDst
(
ts
));
}
else
{
writeLong
(
ts
.
getTime
());
...
...
@@ -466,25 +460,17 @@ public class Transfer {
case
Value
.
BYTE
:
return
ValueByte
.
get
(
readByte
());
case
Value
.
DATE
:
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_9
)
{
return
ValueDate
.
getNoCopy
(
new
Date
(
DateTimeUtils
.
getTimeGMT
(
readLong
())));
}
else
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
return
ValueDate
.
getNoCopy
(
new
Date
(
DateTimeUtils
.
getTimeGMTWithoutDst
(
readLong
())));
}
return
ValueDate
.
getNoCopy
(
new
Date
(
readLong
()));
case
Value
.
TIME
:
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_9
)
{
return
ValueTime
.
getNoCopy
(
new
Time
(
DateTimeUtils
.
getTimeGMT
(
readLong
())));
}
else
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
return
ValueTime
.
getNoCopy
(
new
Time
(
DateTimeUtils
.
getTimeGMTWithoutDst
(
readLong
())));
}
return
ValueTime
.
getNoCopy
(
new
Time
(
readLong
()));
case
Value
.
TIMESTAMP
:
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_9
)
{
Timestamp
ts
=
new
Timestamp
(
DateTimeUtils
.
getTimeGMT
(
readLong
()));
ts
.
setNanos
(
readInt
());
return
ValueTimestamp
.
getNoCopy
(
ts
);
}
else
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
if
(
version
>=
Constants
.
TCP_PROTOCOL_VERSION_7
)
{
Timestamp
ts
=
new
Timestamp
(
DateTimeUtils
.
getTimeGMTWithoutDst
(
readLong
()));
ts
.
setNanos
(
readInt
());
return
ValueTimestamp
.
getNoCopy
(
ts
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论