Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
334374e6
提交
334374e6
authored
10月 27, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
50b5f52a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
1612 行增加
和
1540 行删除
+1612
-1540
changelog.html
h2/src/docsrc/html/changelog.html
+9
-1
roadmap.html
h2/src/docsrc/html/roadmap.html
+2
-1
_docs_en.utf8.txt
h2/src/docsrc/text/_docs_en.utf8.txt
+503
-515
_docs_ja.utf8.txt
h2/src/docsrc/text/_docs_ja.utf8.txt
+503
-515
_docs_en.properties
h2/src/docsrc/textbase/_docs_en.properties
+490
-494
SysProperties.java
h2/src/main/org/h2/constant/SysProperties.java
+1
-0
DiskFile.java
h2/src/main/org/h2/store/DiskFile.java
+7
-0
TableFilter.java
h2/src/main/org/h2/table/TableFilter.java
+4
-0
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+4
-9
TestBase.java
h2/src/test/org/h2/test/TestBase.java
+14
-5
TestMultiThreaded.java
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
+45
-0
todo.txt
h2/src/test/org/h2/test/todo/todo.txt
+30
-0
没有找到文件。
h2/src/docsrc/html/changelog.html
浏览文件 @
334374e6
...
...
@@ -18,7 +18,15 @@ Change Log
<h1>
Change Log
</h1>
<h2>
Next Version (unreleased)
</h2>
<ul><li>
New system property h2.browser to set the browser to use.
<ul><li>
Aliases for built-in data types (such as MEDIUMBLOB which is an alias for BLOB)
can now be re-mapped to another data type using CREATE DOMAIN. However
main built-in data types (such as INTEGER) can not be re-mapped.
</li><li>
The Japanese translation has been completed by Masahiro Ikemoto.
Thanks a lot!
</li><li>
Improved PostgreSQL compatibility for NEXTVAL and CURRVAL.
</li><li>
Less heap memory is needed when multiple databases are open at the same time: The memory reserve
(used to rollback after out of memory) is now global and no longer allocated for each database separately.
</li><li>
New system property h2.browser to set the browser to use.
</li><li>
To start the browser, java.awt.Desktop.browse is now used if available.
</li></ul>
...
...
h2/src/docsrc/html/roadmap.html
浏览文件 @
334374e6
...
...
@@ -32,6 +32,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
Support large updates (use the transaction log to undo).
</li><li>
Shutdown compact
</li><li>
Server side cursors
</li><li>
Support nested outer joins (see todo.txt).
</li></ul>
<h2>
Priority 2
</h2>
...
...
@@ -45,6 +46,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
Optimize .. OR .. to UNION if the cost is lower
</li><li>
Index organized tables CREATE TABLE...(...) ORGANIZATION INDEX (store in data file) (probably file format changes are required for rowId)
</li><li>
Better space re-use in the files after deleting data: shrink the data file without closing the database (if the end of the file is empty)
</li><li>
Implement INSTEAD OF trigger (for views, tables, metadata tables).
</li><li>
Full outer joins
</li><li>
Support trigger on the tables information_schema.tables and ...columns
</li><li>
Test very large databases and LOBs (up to 256 GB)
...
...
@@ -242,7 +244,6 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>
Add a role DBA (like ADMIN).
</li><li>
Better support multiple processors for in-memory databases.
</li><li>
Access rights: remember the owner of an object. COMMENT: allow owner of object to change it.
</li><li>
Implement INSTEAD OF trigger.
</li><li>
Access rights: Finer grained access control (grant access for specific functions)
</li><li>
Support N'text'
</li><li>
Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger
...
...
h2/src/docsrc/text/_docs_en.utf8.txt
浏览文件 @
334374e6
差异被折叠。
点击展开。
h2/src/docsrc/text/_docs_ja.utf8.txt
浏览文件 @
334374e6
差异被折叠。
点击展开。
h2/src/docsrc/textbase/_docs_en.properties
浏览文件 @
334374e6
差异被折叠。
点击展开。
h2/src/main/org/h2/constant/SysProperties.java
浏览文件 @
334374e6
...
...
@@ -107,6 +107,7 @@ public class SysProperties {
/**
* System property <code>h2.browser</code> (default: null).<br />
* The preferred browser to use. If not set, the default browser is used.
* For Windows, to use the Internet Explorer, set this property to 'explorer'.
*/
public
static
final
String
BROWSER
=
getStringSetting
(
"h2.browser"
,
null
);
...
...
h2/src/main/org/h2/store/DiskFile.java
浏览文件 @
334374e6
...
...
@@ -1199,6 +1199,13 @@ public class DiskFile implements CacheWriter {
}
});
// first write all deleted entries
// because delete entries are always 1 block,
// while not-deleted entries can be many blocks
// so for example:
// (A) block: 1 (delete)
// (B) block: 2 (delete)
// (C) block: 1 ('Hello', 2 blocks long)
// needs to be written in this order and not (A) (C) (B)
RedoLogRecord
last
=
null
;
for
(
int
i
=
0
;
i
<
redoBuffer
.
size
();
i
++)
{
RedoLogRecord
entry
=
(
RedoLogRecord
)
redoBuffer
.
get
(
i
);
...
...
h2/src/main/org/h2/table/TableFilter.java
浏览文件 @
334374e6
...
...
@@ -721,5 +721,9 @@ public class TableFilter implements ColumnResolver {
public
Expression
optimize
(
ExpressionColumn
expressionColumn
,
Column
column
)
{
return
expressionColumn
;
}
public
String
toString
()
{
return
alias
!=
null
?
alias
:
""
+
table
;
}
}
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
334374e6
...
...
@@ -92,6 +92,7 @@ import org.h2.test.synth.TestJoin;
import
org.h2.test.synth.TestKill
;
import
org.h2.test.synth.TestKillRestart
;
import
org.h2.test.synth.TestKillRestartMulti
;
import
org.h2.test.synth.TestMultiThreaded
;
import
org.h2.test.synth.TestRandomSQL
;
import
org.h2.test.synth.TestTimer
;
import
org.h2.test.synth.sql.TestSynth
;
...
...
@@ -280,12 +281,7 @@ java org.h2.test.TestAll timer
/*
allow to map TEXT to VARCHAR
PostgreSQL compatibility: TEXT seems to be VARCHAR there.
http://validator.w3.org/
test web site (including search, main, web main)
test with firefox 3, internet explorer, opera, safari, google chrome
test web site with firefox 3, internet explorer, opera, safari, google chrome
test with 1.0
...
...
@@ -296,8 +292,6 @@ osgi: create a sample application, test, document
merge join test case
osgi (derby, hsqldb)
auto_reconnect
implemented:
- auto_server includes auto_reconnect
...
...
@@ -380,7 +374,7 @@ http://www.w3schools.com/sql/
test
.
runTests
();
}
TestPerformance
.
main
(
new
String
[]{
"-init"
,
"-db"
,
"1"
});
System
.
out
.
println
(
"done ("
+
(
System
.
currentTimeMillis
()
-
time
)
+
" ms)
"
);
System
.
out
.
println
(
TestBase
.
formatTime
(
System
.
currentTimeMillis
()
-
time
)
+
" total
"
);
}
/**
...
...
@@ -579,6 +573,7 @@ http://www.w3schools.com/sql/
new
TestRandomSQL
().
runTest
(
this
);
new
TestKillRestart
().
runTest
(
this
);
new
TestKillRestartMulti
().
runTest
(
this
);
new
TestMultiThreaded
().
runTest
(
this
);
// unit
new
TestBitField
().
runTest
(
this
);
...
...
h2/src/test/org/h2/test/TestBase.java
浏览文件 @
334374e6
...
...
@@ -392,13 +392,11 @@ public abstract class TestBase {
/**
* Print a message, prepended with the specified time in milliseconds.
*
* @param
time the
milliseconds
* @param
millis the time in
milliseconds
* @param s the message
*/
static
void
printlnWithTime
(
long
time
,
String
s
)
{
String
t
=
"0000000000"
+
time
;
t
=
t
.
substring
(
t
.
length
()
-
6
);
System
.
out
.
println
(
t
+
" "
+
s
);
static
void
printlnWithTime
(
long
millis
,
String
s
)
{
System
.
out
.
println
(
formatTime
(
millis
)
+
" "
+
s
);
}
/**
...
...
@@ -410,6 +408,17 @@ public abstract class TestBase {
SimpleDateFormat
dateFormat
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
println
(
dateFormat
.
format
(
new
java
.
util
.
Date
())
+
" "
+
s
);
}
/**
* Format the time in the format hh:mm:ss.1234 where 1234 is milliseconds.
*
* @param millis the time in milliseconds
* @return the formatted time
*/
static
String
formatTime
(
long
millis
)
{
return
new
java
.
sql
.
Time
(
java
.
sql
.
Time
.
valueOf
(
"0:0:0"
).
getTime
()
+
millis
).
toString
()
+
"."
+
(
""
+
(
1000
+
(
millis
%
1000
))).
substring
(
1
);
}
/**
* Delete all database files for this database.
...
...
h2/src/test/org/h2/test/synth/TestMultiThreaded.java
0 → 100644
浏览文件 @
334374e6
/*
* Copyright 2004-2008 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
test
.
synth
;
import
java.sql.Connection
;
import
java.util.Random
;
import
org.h2.test.TestBase
;
/**
* Tests the multi-threaded mode.
*/
public
class
TestMultiThreaded
extends
TestBase
{
/**
* Run just this test.
*
* @param a ignored
*/
public
static
void
main
(
String
[]
a
)
throws
Exception
{
TestBase
.
createCaller
().
init
().
test
();
}
public
void
test
()
throws
Exception
{
if
(
config
.
mvcc
)
{
return
;
}
int
test
;
deleteDb
(
"multiThreaded"
);
int
size
=
getSize
(
2
,
4
);
Connection
[]
conn
=
new
Connection
[
size
];
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
conn
[
i
]
=
getConnection
(
"multiThreaded;MULTI_THREADED=1"
);
}
Random
random
=
new
Random
(
1
);
for
(
int
i
=
0
;
i
<
size
;
i
++)
{
conn
[
i
].
close
();
}
}
}
h2/src/test/org/h2/test/todo/todo.txt
浏览文件 @
334374e6
Nested Outer Joins
-----------------
Example:
create table a(x int);
create table b(x int);
create table c(x int, y int);
insert into a values(1);
insert into a values(2);
insert into b values(3);
insert into c values(1, 3);
insert into c values(4, 5);
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;
drop table a;
drop table b;
drop table c;
The following doesn't work correctly:
TableFilter,
private void mapAndAddFilter(Expression on) throws SQLException {
on.mapColumns(this, 0);
if (join == null || on.isEverything(ExpressionVisitor.RESOLVED)) {
addFilterCondition(on, true);
on.createIndexConditions(session, this);
}
if (join != null) {
join.mapAndAddFilter(on);
}
}
Auto Upgrade
-----------------
file conversion should be done automatically when the new engine connects.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论