Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
4231eb92
提交
4231eb92
authored
8 年前
作者:
Sergi Vladykin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update PostgreSQL Jdbc driver + INT2 size fix + get rid of compile time dependecny on PgSQL Jdbc.
上级
94ea0d82
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
21 行删除
+21
-21
PgServerThread.java
h2/src/main/org/h2/server/pg/PgServerThread.java
+1
-1
TestPgServer.java
h2/src/test/org/h2/test/unit/TestPgServer.java
+10
-5
Build.java
h2/src/tools/org/h2/build/Build.java
+9
-14
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+1
-1
没有找到文件。
h2/src/main/org/h2/server/pg/PgServerThread.java
浏览文件 @
4231eb92
...
@@ -573,7 +573,7 @@ public class PgServerThread implements Runnable {
...
@@ -573,7 +573,7 @@ public class PgServerThread implements Runnable {
// binary
// binary
switch
(
pgType
)
{
switch
(
pgType
)
{
case
PgServer
.
PG_TYPE_INT2
:
case
PgServer
.
PG_TYPE_INT2
:
checkParamLength
(
4
,
paramLen
);
checkParamLength
(
2
,
paramLen
);
prep
.
setShort
(
col
,
readShort
());
prep
.
setShort
(
col
,
readShort
());
break
;
break
;
case
PgServer
.
PG_TYPE_INT4
:
case
PgServer
.
PG_TYPE_INT4
:
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/unit/TestPgServer.java
浏览文件 @
4231eb92
...
@@ -15,15 +15,14 @@ import java.sql.ResultSetMetaData;
...
@@ -15,15 +15,14 @@ import java.sql.ResultSetMetaData;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.sql.Statement
;
import
java.sql.Statement
;
import
java.sql.Types
;
import
java.sql.Types
;
import
java.util.Properties
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.Future
;
import
java.util.concurrent.Future
;
import
org.h2.test.TestBase
;
import
org.h2.test.TestBase
;
import
org.h2.tools.Server
;
import
org.h2.tools.Server
;
import
org.postgresql.PGStatement
;
/**
/**
* Tests the PostgreSQL server protocol compliant implementation.
* Tests the PostgreSQL server protocol compliant implementation.
...
@@ -419,8 +418,15 @@ public class TestPgServer extends TestBase {
...
@@ -419,8 +418,15 @@ public class TestPgServer extends TestBase {
"-pgPort"
,
"5535"
,
"-pgDaemon"
,
"-key"
,
"test"
,
"mem:test"
);
"-pgPort"
,
"5535"
,
"-pgDaemon"
,
"-key"
,
"test"
,
"mem:test"
);
server
.
start
();
server
.
start
();
try
{
try
{
Properties
props
=
new
Properties
();
props
.
setProperty
(
"user"
,
"sa"
);
props
.
setProperty
(
"password"
,
"sa"
);
// force server side prepare
props
.
setProperty
(
"prepareThreshold"
,
"1"
);
Connection
conn
=
DriverManager
.
getConnection
(
Connection
conn
=
DriverManager
.
getConnection
(
"jdbc:postgresql://localhost:5535/test"
,
"sa"
,
"sa"
);
"jdbc:postgresql://localhost:5535/test"
,
props
);
Statement
stmt
=
conn
.
createStatement
();
Statement
stmt
=
conn
.
createStatement
();
stmt
.
executeUpdate
(
"create table t1 (id integer, value boolean)"
);
stmt
.
executeUpdate
(
"create table t1 (id integer, value boolean)"
);
...
@@ -429,8 +435,7 @@ public class TestPgServer extends TestBase {
...
@@ -429,8 +435,7 @@ public class TestPgServer extends TestBase {
stmt
.
close
();
stmt
.
close
();
PreparedStatement
pstmt
=
conn
.
prepareStatement
(
"SELECT * FROM t1 WHERE value = ?"
);
PreparedStatement
pstmt
=
conn
.
prepareStatement
(
"SELECT * FROM t1 WHERE value = ?"
);
((
PGStatement
)
pstmt
).
setPrepareThreshold
(
1
);
// force server side prepare
// assertTrue(((PGStatement) pstmt).isUseServerPrepare());
assertTrue
(((
PGStatement
)
pstmt
).
isUseServerPrepare
());
pstmt
.
setObject
(
1
,
false
,
Types
.
OTHER
);
pstmt
.
setObject
(
1
,
false
,
Types
.
OTHER
);
ResultSet
rs
=
pstmt
.
executeQuery
();
ResultSet
rs
=
pstmt
.
executeQuery
();
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/Build.java
浏览文件 @
4231eb92
...
@@ -51,9 +51,9 @@ public class Build extends BuildBase {
...
@@ -51,9 +51,9 @@ public class Build extends BuildBase {
downloadUsingMaven
(
"ext/derbynet-10.10.1.1.jar"
,
downloadUsingMaven
(
"ext/derbynet-10.10.1.1.jar"
,
"org/apache/derby"
,
"derbynet"
,
"10.10.1.1"
,
"org/apache/derby"
,
"derbynet"
,
"10.10.1.1"
,
"912b08dca73663d4665e09cd317be1218412d93e"
);
"912b08dca73663d4665e09cd317be1218412d93e"
);
downloadUsingMaven
(
"ext/postgresql-
8.3-603.jdbc3
.jar"
,
downloadUsingMaven
(
"ext/postgresql-
9.4.1209.jre6
.jar"
,
"
postgresql"
,
"postgresql"
,
"8.3-603.jdbc3
"
,
"
org.postgresql"
,
"postgresql"
,
"9.4.1209.jre6
"
,
"
33d531c3c53055ddcbea3d88bfa093466ffef924
"
);
"
2ed7a5a8c952d9ea18af92efea7e56ef854abfea
"
);
downloadUsingMaven
(
"ext/mysql-connector-java-5.1.6.jar"
,
downloadUsingMaven
(
"ext/mysql-connector-java-5.1.6.jar"
,
"mysql"
,
"mysql-connector-java"
,
"5.1.6"
,
"mysql"
,
"mysql-connector-java"
,
"5.1.6"
,
"380ef5226de2c85ff3b38cbfefeea881c5fce09d"
);
"380ef5226de2c85ff3b38cbfefeea881c5fce09d"
);
...
@@ -66,7 +66,7 @@ public class Build extends BuildBase {
...
@@ -66,7 +66,7 @@ public class Build extends BuildBase {
File
.
pathSeparator
+
"ext/derby-10.10.1.1.jar"
+
File
.
pathSeparator
+
"ext/derby-10.10.1.1.jar"
+
File
.
pathSeparator
+
"ext/derbyclient-10.10.1.1.jar"
+
File
.
pathSeparator
+
"ext/derbyclient-10.10.1.1.jar"
+
File
.
pathSeparator
+
"ext/derbynet-10.10.1.1.jar"
+
File
.
pathSeparator
+
"ext/derbynet-10.10.1.1.jar"
+
File
.
pathSeparator
+
"ext/postgresql-
8.3-603.jdbc3
.jar"
+
File
.
pathSeparator
+
"ext/postgresql-
9.4.1209.jre6
.jar"
+
File
.
pathSeparator
+
"ext/mysql-connector-java-5.1.6.jar"
;
File
.
pathSeparator
+
"ext/mysql-connector-java-5.1.6.jar"
;
StringList
args
=
args
(
"-Xmx128m"
,
StringList
args
=
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
"org.h2.test.bench.TestPerformance"
);
"-cp"
,
cp
,
"org.h2.test.bench.TestPerformance"
);
...
@@ -124,7 +124,7 @@ public class Build extends BuildBase {
...
@@ -124,7 +124,7 @@ public class Build extends BuildBase {
"30a40933caf67d88d9e75957950ccf353b181ab7"
);
"30a40933caf67d88d9e75957950ccf353b181ab7"
);
String
cp
=
"temp"
+
File
.
pathSeparator
+
"bin"
+
String
cp
=
"temp"
+
File
.
pathSeparator
+
"bin"
+
File
.
pathSeparator
+
"ext/emma-2.0.5312.jar"
+
File
.
pathSeparator
+
"ext/emma-2.0.5312.jar"
+
File
.
pathSeparator
+
"ext/postgresql-
8.3-603.jdbc3
.jar"
+
File
.
pathSeparator
+
"ext/postgresql-
9.4.1209.jre6
.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.1.0.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.1.0.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.6.2.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.6.2.jar"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
+
...
@@ -209,7 +209,6 @@ public class Build extends BuildBase {
...
@@ -209,7 +209,6 @@ public class Build extends BuildBase {
File
.
pathSeparator
+
"ext/org.osgi.core-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/org.osgi.core-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/org.osgi.enterprise-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/org.osgi.enterprise-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/jts-core-1.14.0.jar"
+
File
.
pathSeparator
+
"ext/jts-core-1.14.0.jar"
+
File
.
pathSeparator
+
"ext/postgresql-8.3-603.jdbc3.jar"
+
File
.
pathSeparator
+
javaToolsJar
;
File
.
pathSeparator
+
javaToolsJar
;
FileList
files
;
FileList
files
;
if
(
clientOnly
)
{
if
(
clientOnly
)
{
...
@@ -318,9 +317,6 @@ public class Build extends BuildBase {
...
@@ -318,9 +317,6 @@ public class Build extends BuildBase {
downloadOrVerify
(
"ext/junit-4.12.jar"
,
downloadOrVerify
(
"ext/junit-4.12.jar"
,
"junit"
,
"junit"
,
"4.12"
,
"junit"
,
"junit"
,
"4.12"
,
"2973d150c0dc1fefe998f834810d68f278ea58ec"
,
offline
);
"2973d150c0dc1fefe998f834810d68f278ea58ec"
,
offline
);
downloadOrVerify
(
"ext/postgresql-8.3-603.jdbc3.jar"
,
"postgresql"
,
"postgresql"
,
"8.3-603.jdbc3"
,
"33d531c3c53055ddcbea3d88bfa093466ffef924"
,
offline
);
}
}
private
void
downloadOrVerify
(
String
target
,
String
group
,
String
artifact
,
private
void
downloadOrVerify
(
String
target
,
String
group
,
String
artifact
,
...
@@ -347,10 +343,9 @@ public class Build extends BuildBase {
...
@@ -347,10 +343,9 @@ public class Build extends BuildBase {
"com/h2database"
,
"h2"
,
"1.2.127"
,
"com/h2database"
,
"h2"
,
"1.2.127"
,
"056e784c7cf009483366ab9cd8d21d02fe47031a"
);
"056e784c7cf009483366ab9cd8d21d02fe47031a"
);
// for TestPgServer
// for TestPgServer
downloadUsingMaven
(
"ext/postgresql-9.4.1209.jre6.jar"
,
downloadUsingMaven
(
"ext/postgresql-8.3-603.jdbc3.jar"
,
"org.postgresql"
,
"postgresql"
,
"9.4.1209.jre6"
,
"postgresql"
,
"postgresql"
,
"8.3-603.jdbc3"
,
"2ed7a5a8c952d9ea18af92efea7e56ef854abfea"
);
"33d531c3c53055ddcbea3d88bfa093466ffef924"
);
// for TestTraceSystem
// for TestTraceSystem
downloadUsingMaven
(
"ext/slf4j-nop-1.6.0.jar"
,
downloadUsingMaven
(
"ext/slf4j-nop-1.6.0.jar"
,
"org/slf4j"
,
"slf4j-nop"
,
"1.6.0"
,
"org/slf4j"
,
"slf4j-nop"
,
"1.6.0"
,
...
@@ -919,7 +914,7 @@ public class Build extends BuildBase {
...
@@ -919,7 +914,7 @@ public class Build extends BuildBase {
private
void
test
(
boolean
fast
)
{
private
void
test
(
boolean
fast
)
{
downloadTest
();
downloadTest
();
String
cp
=
"temp"
+
File
.
pathSeparator
+
"bin"
+
String
cp
=
"temp"
+
File
.
pathSeparator
+
"bin"
+
File
.
pathSeparator
+
"ext/postgresql-
8.3-603.jdbc3
.jar"
+
File
.
pathSeparator
+
"ext/postgresql-
9.4.1209.jre6
.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.1.0.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.1.0.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.6.2.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.6.2.jar"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
+
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
4231eb92
...
@@ -599,7 +599,7 @@ public class BuildBase {
...
@@ -599,7 +599,7 @@ public class BuildBase {
if
(
targetFile
.
exists
())
{
if
(
targetFile
.
exists
())
{
return
;
return
;
}
}
String
repoFile
=
group
+
"/"
+
artifact
+
"/"
+
version
+
"/"
String
repoFile
=
group
.
replace
(
'.'
,
'/'
)
+
"/"
+
artifact
+
"/"
+
version
+
"/"
+
artifact
+
"-"
+
version
+
".jar"
;
+
artifact
+
"-"
+
version
+
".jar"
;
mkdirs
(
targetFile
.
getAbsoluteFile
().
getParentFile
());
mkdirs
(
targetFile
.
getAbsoluteFile
().
getParentFile
());
String
localMavenDir
=
getLocalMavenDir
();
String
localMavenDir
=
getLocalMavenDir
();
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论