Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
e0b3be30
提交
e0b3be30
authored
10 年前
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1 from thomasmueller/master
Java 8 compatibility for regexp_replace and tests
上级
5ba97093
09716365
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
34 行增加
和
10 行删除
+34
-10
.gitignore
h2/.gitignore
+8
-0
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
Function.java
h2/src/main/org/h2/expression/Function.java
+3
-0
TestScript.java
h2/src/test/org/h2/test/db/TestScript.java
+1
-2
testScript.sql
h2/src/test/org/h2/test/testScript.sql
+5
-5
Build.java
h2/src/tools/org/h2/build/Build.java
+16
-2
没有找到文件。
h2/.gitignore
0 → 100644
浏览文件 @
e0b3be30
.classpath
.project
bin
docs
ext
error.*
temp
test.out.txt
This diff is collapsed.
Click to expand it.
h2/src/docsrc/html/changelog.html
浏览文件 @
e0b3be30
...
...
@@ -20,7 +20,7 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
-
<ul><li>
Java 8 compatibility for "regexp_replace".
</li></ul>
<h2>
Version 1.4.187 Beta (2015-04-10)
</h2>
...
...
This diff is collapsed.
Click to expand it.
h2/src/main/org/h2/expression/Function.java
浏览文件 @
e0b3be30
...
...
@@ -1360,6 +1360,9 @@ public class Function extends Expression implements FunctionCall {
}
catch
(
PatternSyntaxException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
regexp
);
}
catch
(
IllegalArgumentException
e
)
{
throw
DbException
.
get
(
ErrorCode
.
LIKE_ESCAPE_ERROR_1
,
e
,
replacement
);
}
break
;
}
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/db/TestScript.java
浏览文件 @
e0b3be30
...
...
@@ -349,7 +349,7 @@ public class TestScript extends TestBase {
private
void
writeResult
(
String
sql
,
String
s
,
SQLException
e
)
throws
Exception
{
assertKnownException
(
e
);
assertKnownException
(
sql
,
e
);
s
=
(
"> "
+
s
).
trim
();
String
compare
=
readLine
();
if
(
compare
!=
null
&&
compare
.
startsWith
(
">"
))
{
...
...
@@ -377,7 +377,6 @@ public class TestScript extends TestBase {
putBack
=
compare
;
}
write
(
s
);
}
private
void
write
(
String
s
)
{
...
...
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/testScript.sql
浏览文件 @
e0b3be30
...
...
@@ -1614,7 +1614,7 @@ SELECT * FROM TEST;
DROP TABLE TEST;
> ok
call '
a
' regexp '
\
Ho
.
*
';
call '
a
' regexp '
Ho
.
*
\
';
> exception
set @t = 0;
...
...
@@ -9376,10 +9376,10 @@ select degrees(null) vn, degrees(1) v1, degrees(1.1) v2, degrees(-1.1) v3, degre
>
null
57
.
29577951308232
63
.
02535746439057
-
63
.
02535746439057
108
.
86198107485642
-
108
.
86198107485642
>
rows
:
1
select
exp
(
null
)
vn
,
exp
(
1
)
v1
,
exp
(
1
.
1
)
v2
,
exp
(
-
1
.
1
)
v3
,
exp
(
1
.
9
)
v4
,
exp
(
-
1
.
9
)
v5
from
test
;
>
VN
V1
V2
V3
V4
V5
>
---- ----
-------------- ------------------ ------------------ ------------------ ---------------
----
>
null
2
.
71
82818284590455
3
.
0041660239464334
0
.
3328710836980795
6
.
6858944422792685
0
.
14956861922263506
select
exp
(
null
)
vn
,
left
(
exp
(
1
),
4
)
v1
,
left
(
exp
(
1
.
1
),
4
)
v2
,
left
(
exp
(
-
1
.
1
),
4
)
v3
,
left
(
exp
(
1
.
9
),
4
)
v4
,
left
(
exp
(
-
1
.
9
),
4
)
v5
from
test
;
>
VN
V1
V2
V3
V4
V5
>
---- ----
---- ---- ----
----
>
null
2
.
71
3
.
00
0
.
33
6
.
68
0
.
14
>
rows
:
1
select
radians
(
null
)
vn
,
radians
(
1
)
v1
,
radians
(
1
.
1
)
v2
,
radians
(
-
1
.
1
)
v3
,
radians
(
1
.
9
)
v4
,
radians
(
-
1
.
9
)
v5
from
test
;
...
...
This diff is collapsed.
Click to expand it.
h2/src/tools/org/h2/build/Build.java
浏览文件 @
e0b3be30
...
...
@@ -783,8 +783,22 @@ public class Build extends BuildBase {
*/
public
void
test
()
{
downloadTest
();
String
testClass
=
System
.
getProperty
(
"test"
,
"org.h2.test.TestAll"
);
java
(
testClass
,
null
);
String
cp
=
"temp"
+
File
.
pathSeparator
+
"bin"
+
File
.
pathSeparator
+
"ext/postgresql-8.3-603.jdbc3.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.0.1.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.0.2.jar"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
+
File
.
pathSeparator
+
"ext/org.osgi.core-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/org.osgi.enterprise-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/jts-1.13.jar"
+
File
.
pathSeparator
+
"ext/slf4j-api-1.6.0.jar"
+
File
.
pathSeparator
+
"ext/slf4j-nop-1.6.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
;
exec
(
"java"
,
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
"org.h2.test.TestAll"
));
}
/**
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论