Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
28077cb0
提交
28077cb0
authored
6月 25, 2010
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Documentation.
上级
4263bc30
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
4157 行增加
和
4287 行删除
+4157
-4287
advanced.html
h2/src/docsrc/html/advanced.html
+1
-1
changelog.html
h2/src/docsrc/html/changelog.html
+1
-1
features.html
h2/src/docsrc/html/features.html
+1
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+2
-1
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+1310
-1364
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+1310
-1364
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+1297
-1315
Parser.java
h2/src/main/org/h2/command/Parser.java
+2
-2
RangeTable.java
h2/src/main/org/h2/table/RangeTable.java
+1
-0
TableFilter.java
h2/src/main/org/h2/table/TableFilter.java
+25
-6
TableView.java
h2/src/main/org/h2/table/TableView.java
+4
-34
TestNestedJoins.java
h2/src/test/org/h2/test/db/TestNestedJoins.java
+8
-4
TestViewDropView.java
h2/src/test/org/h2/test/db/TestViewDropView.java
+194
-193
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/docsrc/html/advanced.html
浏览文件 @
28077cb0
...
...
@@ -226,7 +226,7 @@ to write to a table (update or delete a row), an exclusive lock is required. To
exclusive lock, other connection must not have any locks on the object. After the
connection commits, all locks are released.
This database keeps all locks in memory.
When
releasing a lock, one of the waiting connections
is picked at random.
When
a lock is released, and multiple connections are waiting for it, one of them
is picked at random.
</p>
<h3>
Lock Timeout
</h3>
...
...
h2/src/docsrc/html/changelog.html
浏览文件 @
28077cb0
...
...
@@ -37,7 +37,7 @@ Change Log
</li><li>
DROP VIEW now supports the CASCADE and RESTRICT clauses (patch from Kerry Sainsbury)
</li><li>
CREATE VIEW now supports the OR REPLACE clause (patch from Kerry Sainsbury)
</li><li>
Build tool: ability to only run one test using the -Dtest=className setting.
eg: build -Dtest=org.h2.test.db.TestViewDropView test (patch from Kerry Sainsbury)
eg: build -Dtest=org.h2.test.db.TestViewDropView test (patch from Kerry Sainsbury).
</li></ul>
<h2>
Version 1.2.137 (2010-06-06)
</h2>
...
...
h2/src/docsrc/html/features.html
浏览文件 @
28077cb0
...
...
@@ -353,7 +353,7 @@ encrypted using AES-128 and XTEA encryption algorithms
*7 Derby only supports updatable result sets if the query is not sorted.
<br
/>
*8 Derby and HSQLDB don't support standard compliant information schema tables.
<br
/>
*9 When using MVCC (multi version concurrency).
<br
/>
*10 Derby and HSQLDB
*10 Derby and HSQLDB
<a
href=
"http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation#Electronic_codebook_.28ECB.29"
>
don't hide hide data patterns well
</a>
.
<br
/>
*11 The MULTI_THREADED option is not enabled by default, and not yet supported when using MVCC.
</p>
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
28077cb0
...
...
@@ -60,7 +60,8 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Deferred integrity checking (DEFERRABLE INITIALLY DEFERRED).
</li><li>
Groovy Stored Procedures: http://groovy.codehaus.org/Groovy+SQL
</li><li>
Add a migration guide (list differences between databases).
</li><li>
Migrate database tool (also from other database engines).
</li><li>
Migrate database tool (also from other database engines). For Oracle, maybe use
DBMS_METADATA.GET_DDL / GET_DEPENDENT_DDL.
</li><li>
Optimization: automatic index creation suggestion using the trace file?
</li><li>
Compression performance: don't allocate buffers, compress / expand in to out buffer.
</li><li>
Rebuild index functionality to shrink index size and improve performance.
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
28077cb0
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
28077cb0
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
28077cb0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
h2/src/main/org/h2/command/Parser.java
浏览文件 @
28077cb0
...
...
@@ -3558,8 +3558,8 @@ public class Parser {
private
Prepared
parseCreate
()
{
boolean
orReplace
=
false
;
if
(
readIf
(
"OR"
))
{
read
(
"REPLACE"
);
orReplace
=
true
;
read
(
"REPLACE"
);
orReplace
=
true
;
}
boolean
force
=
readIf
(
"FORCE"
);
...
...
h2/src/main/org/h2/table/RangeTable.java
浏览文件 @
28077cb0
...
...
@@ -37,6 +37,7 @@ public class RangeTable extends Table {
* @param schema the schema (always the main schema)
* @param min the start expression
* @param max the end expression
* @param noColumns whether this table has no columns
*/
public
RangeTable
(
Schema
schema
,
Expression
min
,
Expression
max
,
boolean
noColumns
)
{
super
(
schema
,
0
,
NAME
,
true
,
true
);
...
...
h2/src/main/org/h2/table/TableFilter.java
浏览文件 @
28077cb0
...
...
@@ -176,7 +176,7 @@ public class TableFilter implements ColumnResolver {
if
(
nestedJoin
!=
null
)
{
setEvaluatable
(
nestedJoin
);
item
.
setNestedJoinPlan
(
nestedJoin
.
getBestPlanItem
(
s
,
level
));
int
todo
NestJoinCostWrong
;
int
todo
CheckCost
;
// TODO optimizer: calculate cost of a join: should use separate
// expected row number and lookup cost
item
.
cost
+=
item
.
cost
*
item
.
getNestedJoinPlan
().
cost
;
...
...
@@ -387,6 +387,9 @@ public class TableFilter implements ColumnResolver {
return
false
;
}
/**
* Set the state of this and all nested tables to the NULL row.
*/
protected
void
setNullRow
()
{
state
=
NULL_ROW
;
current
=
table
.
getNullRow
();
...
...
@@ -486,6 +489,7 @@ public class TableFilter implements ColumnResolver {
*
* @param filter the joined table filter
* @param outer if this is an outer join
* @param nested if this is a nested join
* @param on the join condition
*/
public
void
addJoin
(
TableFilter
filter
,
boolean
outer
,
boolean
nested
,
final
Expression
on
)
{
...
...
@@ -575,7 +579,8 @@ public class TableFilter implements ColumnResolver {
}
/**
* Whether this is indirectly an outer joined table (nested within an inner join).
* Whether this is indirectly an outer joined table (nested within an inner
* join).
*
* @return true if it is
*/
...
...
@@ -903,6 +908,11 @@ public class TableFilter implements ColumnResolver {
return
nestedJoin
;
}
/**
* Visit this and all joined or nested table filters.
*
* @param visitor the visitor
*/
public
void
visit
(
TableFilterVisitor
visitor
)
{
TableFilter
f
=
this
;
do
{
...
...
@@ -915,12 +925,21 @@ public class TableFilter implements ColumnResolver {
}
while
(
f
!=
null
);
}
public
static
interface
TableFilterVisitor
{
public
void
accept
(
TableFilter
f
);
}
public
boolean
isEvaluatable
()
{
return
evaluatable
;
}
/**
* A visitor for table filters.
*/
public
static
interface
TableFilterVisitor
{
/**
* This method is called for each nested or joined table filter.
*
* @param f the filter
*/
public
void
accept
(
TableFilter
f
);
}
}
h2/src/main/org/h2/table/TableView.java
浏览文件 @
28077cb0
...
...
@@ -152,22 +152,8 @@ public class TableView extends Table {
}
public
String
getDropSQL
()
{
return
getDropSQL
(
false
);
}
/**
* Build a SQL statement to drop this object.
*
* @param cascade if true, then include the CASCADE clause in the DROP VIEW statement
*
* @return the SQL statement
*/
public
String
getDropSQL
(
boolean
cascade
)
{
StatementBuilder
buff
=
new
StatementBuilder
(
"DROP VIEW IF EXISTS "
);
buff
.
append
(
getSQL
());
if
(
cascade
)
{
buff
.
append
(
" CASCADE"
);
}
return
buff
.
toString
();
}
...
...
@@ -176,11 +162,11 @@ public class TableView extends Table {
}
/**
* Generate "CREATE" SQL
for the view
* Generate "CREATE" SQL
statement for the view.
*
* @param orReplace if true, then include the OR REPLACE clause
in the SQL
* @param force if true, then include the FORCE clause
in the SQL
* @return the SQL
* @param orReplace if true, then include the OR REPLACE clause
* @param force if true, then include the FORCE clause
* @return the SQL
statement
*/
public
String
getCreateSQL
(
boolean
orReplace
,
boolean
force
)
{
StatementBuilder
buff
=
new
StatementBuilder
(
"CREATE "
);
...
...
@@ -402,20 +388,4 @@ public class TableView extends Table {
return
viewQuery
.
isEverything
(
ExpressionVisitor
.
DETERMINISTIC
);
}
/**
* Indicate if this view makes use of the given schema
*
* @param schema the name to check for
* @return true of the view uses the given schema.
*/
public
boolean
usesSchema
(
Schema
schema
)
{
boolean
result
=
false
;
for
(
Table
table
:
tables
)
{
if
(
table
.
getSchema
().
equals
(
schema
))
{
result
=
true
;
break
;
}
}
return
result
;
}
}
h2/src/test/org/h2/test/db/TestNestedJoins.java
浏览文件 @
28077cb0
...
...
@@ -27,7 +27,7 @@ import org.h2.util.ScriptReader;
*/
public
class
TestNestedJoins
extends
TestBase
{
ArrayList
<
Statement
>
dbs
=
New
.
arrayList
();
private
ArrayList
<
Statement
>
dbs
=
New
.
arrayList
();
/**
* Run just this test.
...
...
@@ -67,7 +67,9 @@ public class TestNestedJoins extends TestBase {
// deleteDerby();
// try {
// Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
// Connection c2 = DriverManager.getConnection("jdbc:derby:" + getBaseDir() + "/derby/test;create=true", "sa", "sa");
// Connection c2 = DriverManager.getConnection(
// "jdbc:derby:" + getBaseDir() +
// "/derby/test;create=true", "sa", "sa");
// dbs.add(c2.createStatement());
// } catch (Exception e) {
// // database not installed - ok
...
...
@@ -333,8 +335,10 @@ public class TestNestedJoins extends TestBase {
insert into b values(3);
insert into c values(1, 3);
insert into c values(4, 5);
explain select * from a left outer join (b left outer join c on b.x = c.y) on a.x = c.x;
select * from a left outer join (b left outer join c on b.x = c.y) on a.x = c.x;
explain select * from a left outer join
(b left outer join c on b.x = c.y) on a.x = c.x;
select * from a left outer join
(b left outer join c on b.x = c.y) on a.x = c.x;
*/
stat
.
execute
(
"create table a(x int)"
);
stat
.
execute
(
"create table b(x int)"
);
...
...
h2/src/test/org/h2/test/db/TestViewDropView.java
浏览文件 @
28077cb0
差异被折叠。
点击展开。
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
28077cb0
...
...
@@ -647,4 +647,4 @@ recorder grajciar recording slovensky uninitialized arriving lubomir unchanged
erik dick calculations lutin cite bom evaluating telegard excel bbs deprecation
importing cumulative fired convenient sums judged anybody vacuum encountered
corresponds cnf informatique ilm boundaries shao crossed retroweaver usr pico
pengxiang china timestampadd
pengxiang china timestampadd
picked
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论