Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
48127508
提交
48127508
authored
7月 07, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
029f4b22
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
25 行增加
和
34 行删除
+25
-34
roadmap.html
h2/src/docsrc/html/roadmap.html
+5
-1
cheatSheet.html
h2/src/installer/cheatSheet.html
+14
-15
PageStore.java
h2/src/main/org/h2/store/PageStore.java
+4
-1
TestAll.java
h2/src/test/org/h2/test/TestAll.java
+2
-17
没有找到文件。
h2/src/docsrc/html/roadmap.html
浏览文件 @
48127508
...
@@ -425,7 +425,11 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
...
@@ -425,7 +425,11 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>
Support INTERVAL data type (see Oracle and others).
</li><li>
Support INTERVAL data type (see Oracle and others).
</li><li>
Combine Server and Console tool (only keep Server).
</li><li>
Combine Server and Console tool (only keep Server).
</li><li>
Store the Lucene index in the database itself.
</li><li>
Store the Lucene index in the database itself.
</li><li>
Oracle compatibility: support DECODE(x, ...)
</li><li>
Oracle compatibility: support DECODE(x, ...).
</li><li>
Console: Start Browser: if ip number changed, try localhost instead.
</li><li>
MVCC: compare concurrent update behavior with PostgreSQL and Oracle.
</li><li>
HSQLDB compatibility: CREATE FUNCTION (maybe using a Function interface).
</li><li>
HSQLDB compatibility: support CALL "java.lang.Math.sqrt"(2.0)
</li></ul>
</li></ul>
<h2>
Not Planned
</h2>
<h2>
Not Planned
</h2>
...
...
h2/src/installer/cheatSheet.html
浏览文件 @
48127508
...
@@ -86,14 +86,14 @@ li {
...
@@ -86,14 +86,14 @@ li {
<div
style=
"float:left; margin:5px; width:320px;"
>
<div
style=
"float:left; margin:5px; width:320px;"
>
<h2>
Using H2
</h2>
<h2>
Using H2
</h2>
<ul><li>
Download the
<ul><li>
H2 is open source, free to use and distribute.
</li><li>
Download the
<a
href=
"http://repo1.maven.org/maven2/com/h2database/h2/1.1.111/h2-1.1.111.jar"
>
jar file
</a>
,
<a
href=
"http://repo1.maven.org/maven2/com/h2database/h2/1.1.111/h2-1.1.111.jar"
>
jar file
</a>
,
<a
href=
"http://www.h2database.com/h2-setup-2009-04-10.exe"
>
Windows installer
</a>
, or
<a
href=
"http://www.h2database.com/h2-setup-2009-04-10.exe"
>
Windows installer
</a>
, or
<a
href=
"http://www.h2database.com/h2-2009-04-10.zip"
>
zip file
</a>
.
<a
href=
"http://www.h2database.com/h2-2009-04-10.zip"
>
zip file
</a>
.
</li><li>
To start the H2 Console tool, double click the jar file, or run
<code>
java -jar h2*.jar
</code>
,
<code>
h2.bat
</code>
or
<code>
h2.sh
</code>
.
</li><li>
To start the H2 Console tool, double click the jar file, or run
<code>
java -jar h2*.jar
</code>
,
<code>
h2.bat
</code>
or
<code>
h2.sh
</code>
.
</li><li>
A new database is automatically created if it does not yet exist.
</li><li>
A new database is automatically created if it does not yet exist.
</li><li>
Closing the last connection closes a database.
</li><li>
Closing the last connection closes a database.
</li><li>
H2 is open source, free to use and distribute.
</li></ul>
</li></ul>
<h2>
Database URLs
</h2>
<h2>
Database URLs
</h2>
...
@@ -105,7 +105,7 @@ li {
...
@@ -105,7 +105,7 @@ li {
</p><p>
</p><p>
<b>
In-Memory
</b><br
/>
<b>
In-Memory
</b><br
/>
<code>
jdbc:h2:mem:test
</code>
multiple connections in one process
<br
/>
<code>
jdbc:h2:mem:test
</code>
multiple connections in one process
<br
/>
<code>
jdbc:h2:mem:
</code>
unnamed private
database
; one connection
<br
/>
<code>
jdbc:h2:mem:
</code>
unnamed private; one connection
<br
/>
</p><p>
</p><p>
<b>
Server Mode
</b><br
/>
<b>
Server Mode
</b><br
/>
<code>
jdbc:h2:tcp://localhost/~/test
</code>
user home dir
<br
/>
<code>
jdbc:h2:tcp://localhost/~/test
</code>
user home dir
<br
/>
...
@@ -113,7 +113,7 @@ li {
...
@@ -113,7 +113,7 @@ li {
</p><p>
</p><p>
<b>
Settings
</b><br
/>
<b>
Settings
</b><br
/>
<code>
jdbc:h2:..;MODE=MySQL
</code>
compatibility (or HSQLDB,...)
<br
/>
<code>
jdbc:h2:..;MODE=MySQL
</code>
compatibility (or HSQLDB,...)
<br
/>
<code>
jdbc:h2:..;TRACE_LEVEL_FILE=3
</code>
log to .trace.db
<br
/>
<code>
jdbc:h2:..;TRACE_LEVEL_FILE=3
</code>
log to
*
.trace.db
<br
/>
</p>
</p>
<h2>
Documentation
</h2>
<h2>
Documentation
</h2>
...
@@ -157,15 +157,6 @@ conn.close(); cp.dispose();
...
@@ -157,15 +157,6 @@ conn.close(); cp.dispose();
java -cp h2*.jar org.h2.tools.Server
java -cp h2*.jar org.h2.tools.Server
</pre>
</pre>
<h2>
Hibernate
</h2>
In the file hibernate.cfg.xml, set:
<pre>
<
property name="dialect"
>
org.hibernate.dialect.H2Dialect
<
/property
>
</pre>
As an alternative, use the HSQLDialect.
<h2>
Maven
</h2>
<h2>
Maven
</h2>
<pre>
<pre>
<
dependency
>
<
dependency
>
...
@@ -175,9 +166,17 @@ As an alternative, use the HSQLDialect.
...
@@ -175,9 +166,17 @@ As an alternative, use the HSQLDialect.
<
/dependency
>
<
/dependency
>
</pre>
</pre>
<h2>
Hibernate
</h2>
hibernate.cfg.xml (or use the HSQLDialect):
<pre>
<
property name="dialect"
>
org.hibernate.dialect.H2Dialect
<
/property
>
</pre>
<h2>
TopLink and Glassfish
</h2>
<h2>
TopLink and Glassfish
</h2>
Datasource Classname: org.h2.jdbcx.JdbcDataSource
datasource classname: org.h2.jdbcx.JdbcDataSource
<br
/>
toplink.target-database:
oracle.toplink.essentials.platform.database.H2Platform
oracle.toplink.essentials.platform.database.H2Platform
</div>
</div>
...
...
h2/src/main/org/h2/store/PageStore.java
浏览文件 @
48127508
...
@@ -113,6 +113,8 @@ public class PageStore implements CacheWriter {
...
@@ -113,6 +113,8 @@ public class PageStore implements CacheWriter {
// TODO space re-use: run TestPerformance multiple times, size should stay
// TODO space re-use: run TestPerformance multiple times, size should stay
// TODO when inserting many rows, do not split at (entryCount / 2) + 1
// TODO when inserting many rows, do not split at (entryCount / 2) + 1
// TODO maybe split at the last insertion point
// TODO maybe split at the last insertion point
// TODO test running out of disk space (using a special file system)
// TODO check for file size (exception if not exact size expected)
// TODO when removing DiskFile:
// TODO when removing DiskFile:
// remove CacheObject.blockCount
// remove CacheObject.blockCount
...
@@ -1047,7 +1049,8 @@ public class PageStore implements CacheWriter {
...
@@ -1047,7 +1049,8 @@ public class PageStore implements CacheWriter {
// s2 += s1 += d[ps - 1] & 255;
// s2 += s1 += d[ps - 1] & 255;
// if (d[5] != (byte) (((s1 & 255) + (s1 >> 8)) ^ pos)
// if (d[5] != (byte) (((s1 & 255) + (s1 >> 8)) ^ pos)
// || d[6] != (byte) (((s2 & 255) + (s2 >> 8)) ^ (pos >> 8))) {
// || d[6] != (byte) (((s2 & 255) + (s2 >> 8)) ^ (pos >> 8))) {
// throw Message.getSQLException(ErrorCode.FILE_CORRUPTED_1, "wrong checksum");
// throw Message.getSQLException(
// ErrorCode.FILE_CORRUPTED_1, "wrong checksum");
// }
// }
// }
// }
...
...
h2/src/test/org/h2/test/TestAll.java
浏览文件 @
48127508
...
@@ -285,31 +285,16 @@ java org.h2.test.TestAll timer
...
@@ -285,31 +285,16 @@ java org.h2.test.TestAll timer
System
.
setProperty
(
"h2.maxMemoryRowsDistinct"
,
"128"
);
System
.
setProperty
(
"h2.maxMemoryRowsDistinct"
,
"128"
);
System
.
setProperty
(
"h2.check2"
,
"true"
);
System
.
setProperty
(
"h2.check2"
,
"true"
);
//
System.setProperty("h2.pageStore", "true");
//
System.setProperty("h2.pageStore", "true");
/*
/*
Console: Start Browser: if ip number changed, try localhost
test case for running out of disk space (using a special file system)
auto-build: prepare release
documentation: rolling review at roadmap.html: done
create a short documentation
create a short documentation
test performance with log=2
documentation: rolling review at roadmap.html: done
remove old TODO, move to roadmap
remove old TODO, move to roadmap
TestMVCC:
Concurrent update in table test: another transaction has updated or
deleted the same row when exactly does it occur in other databases
(PostgreSQL, Oracle)?
CREATE FUNCTION? Function interface; HSQLDB compatibility
kill a specific java process:
kill a specific java process:
kill -9 `jps -l | grep "org.h2.test.TestAll" | cut -d " " -f 1`
kill -9 `jps -l | grep "org.h2.test.TestAll" | cut -d " " -f 1`
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论