Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
288e4846
提交
288e4846
authored
12月 14, 2016
作者:
ebocher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add test for spatial index
上级
3f5cad84
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
26 行增加
和
1 行删除
+26
-1
changelog.html
h2/src/docsrc/html/changelog.html
+2
-0
help.csv
h2/src/main/org/h2/res/help.csv
+6
-1
TestSpatial.java
h2/src/test/org/h2/test/db/TestSpatial.java
+18
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
288e4846
...
@@ -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>
Add a test case to ensure that spatial index is used with and order by command, by Bocher E
</li>
<li>
Fix multi-threaded mode update exception "NullPointerException", test case by Anatolii K
<li>
Fix multi-threaded mode update exception "NullPointerException", test case by Anatolii K
</li>
</li>
<li>
Fix multi-threaded mode insert exception "Unique index or primary key violation", test case by Anatolii K
<li>
Fix multi-threaded mode insert exception "Unique index or primary key violation", test case by Anatolii K
...
...
h2/src/main/org/h2/res/help.csv
浏览文件 @
288e4846
...
@@ -577,7 +577,7 @@ compare { { { ALL | ANY | SOME } ( select ) } | operand }
...
@@ -577,7 +577,7 @@ compare { { { ALL | ANY | SOME } ( select ) } | operand }
| IS [ NOT ] [ DISTINCT FROM ] operand
| IS [ NOT ] [ DISTINCT FROM ] operand
| BETWEEN operand AND operand
| BETWEEN operand AND operand
| IN ( { select | expression [,...] } )
| IN ( { select | expression [,...] } )
| [ NOT ]
LIKE
operand [ ESCAPE string ]
| [ NOT ]
[ LIKE | ILIKE ]
operand [ ESCAPE string ]
| [ NOT ] REGEXP operand
| [ NOT ] REGEXP operand
","
","
The right hand side of a condition."
The right hand side of a condition."
...
@@ -947,6 +947,11 @@ Calculate the angle when converting the rectangular coordinates to polar coordin
...
@@ -947,6 +947,11 @@ Calculate the angle when converting the rectangular coordinates to polar coordin
BITAND(long, long)
BITAND(long, long)
","
","
The bitwise AND operation."
The bitwise AND operation."
"Functions (Numeric)","BITGET","
BITGET(long, int)
","
Returns true if and only if the first parameter has a bit set in the
position specified by the second parameter."
"Functions (Numeric)","BITOR","
"Functions (Numeric)","BITOR","
BITOR(long, long)
BITOR(long, long)
","
","
...
...
h2/src/test/org/h2/test/db/TestSpatial.java
浏览文件 @
288e4846
...
@@ -94,6 +94,7 @@ public class TestSpatial extends TestBase {
...
@@ -94,6 +94,7 @@ public class TestSpatial extends TestBase {
testNullableGeometryUpdate
();
testNullableGeometryUpdate
();
testIndexUpdateNullGeometry
();
testIndexUpdateNullGeometry
();
testInsertNull
();
testInsertNull
();
testSpatialIndexWithOrder
();
}
}
private
void
testBug1
()
throws
SQLException
{
private
void
testBug1
()
throws
SQLException
{
...
@@ -1138,4 +1139,21 @@ public class TestSpatial extends TestBase {
...
@@ -1138,4 +1139,21 @@ public class TestSpatial extends TestBase {
}
}
}
}
private
void
testSpatialIndexWithOrder
()
throws
SQLException
{
deleteDb
(
"spatial"
);
Connection
conn
=
getConnection
(
URL
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"DROP TABLE IF EXISTS BUILDINGS;"
+
"CREATE TABLE BUILDINGS (PK serial, THE_GEOM geometry);"
+
"insert into buildings(the_geom) SELECT 'POINT(1 1)"
+
"'::geometry from SYSTEM_RANGE(1,10000);\n"
+
"CREATE SPATIAL INDEX ON PUBLIC.BUILDINGS(THE_GEOM);\n"
);
try
(
ResultSet
rs
=
stat
.
executeQuery
(
"EXPLAIN SELECT * FROM "
+
"BUILDINGS ORDER BY PK LIMIT 51;"
))
{
assertTrue
(
rs
.
next
());
assertTrue
(
rs
.
getString
(
1
).
contains
(
"PRIMARY_KEY"
));
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论