提交 0338a8e2 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation

上级 a15bfe87
......@@ -1131,6 +1131,10 @@ SET COLLATION ENGLISH
"Commands (Other)","SET COMPRESS_LOB","
SET COMPRESS_LOB { NO | LZF | DEFLATE }
","
This feature is only available for the PageStore storage engine.
For the MVStore engine (the default for H2 version 1.4.x),
append "";COMPRESS=TRUE"" to the database URL instead.
Sets the compression algorithm for BLOB and CLOB data. Compression is usually
slower, but needs less disk space. LZF is faster but uses more space.
......
......@@ -141,6 +141,9 @@ that don't involve this column.
<h3>Large Object Compression</h3>
<p>
The following feature is only available for the PageStore storage engine.
For the MVStore engine (the default for H2 version 1.4.x),
append <code>;COMPRESS=TRUE</code> to the database URL instead.
CLOB and BLOB values can be compressed by using
<a href="grammar.html#set_compress_lob" class="notranslate" >SET COMPRESS_LOB</a>.
The LZF algorithm is faster but needs more disk space. By default compression is disabled, which usually speeds up write
......@@ -1193,12 +1196,24 @@ SELECT * FROM USERS WHERE LENGTH(PASSWORD)=ZERO();
By default this database does not allow connections from other machines when starting the H2 Console,
the TCP server, or the PG server. Remote access can be enabled using the command line
options <code>-webAllowOthers, -tcpAllowOthers, -pgAllowOthers</code>.
If you enable remote access, please also consider using the options
<code>-baseDir, -ifExists</code>, so that remote
users can not create new databases or access existing databases with weak passwords.
</p>
<p>
If you enable remote access using
<code>-tcpAllowOthers</code> or <code>-pgAllowOthers</code>,
please also consider using the options <code>-baseDir, -ifExists</code>,
so that remote users can not create new databases
or access existing databases with weak passwords.
When using the option <code>-baseDir</code>, only databases within that directory may be accessed.
Ensure the existing accessible databases are protected using strong passwords.
</p>
<p>
If you enable remote access using <code>-webAllowOthers</code>,
please ensure the web server can only be accessed from thrusted networks.
The options <code>-baseDir, -ifExists</code> don't protect
access to the tools section, prevent remote shutdown of the web server,
changes to the preferences, the saved connection settings,
or access to other databases accessible from the system.
</p>
<h2 id="restricting_classes">Restricting Class Loading and Usage</h2>
<p>
......
......@@ -151,7 +151,7 @@ however after a new release it may take a few hours before they are available th
<h3>Maven Plugin to Start and Stop the TCP Server</h3>
<p>
A Maven plugin to start and stop the H2 TCP server is available from
<a href="https://github.com/ljnelson/h2-maven-plugin">Laird Nelson at GitHub</a>.
<a href="http://github.com/ljnelson/h2-maven-plugin">Laird Nelson at GitHub</a>.
To start the H2 server, use:
</p>
<pre>
......
......@@ -17,7 +17,19 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>Issue 584: the error message for a wrong sequence definition was wrong.
<ul><li>OSGi: the MVStore packages are now exported.
</li><li>With the MVStore option, when using multiple threads
that concurrently create indexes or tables,
it was relatively easy to get a lock timeout on the "SYS" table.
</li><li>When using the multi-threaded option, the exception
"Unexpected code path" could be thrown, specially if the option
"analyze_auto" was set to a low value.
</li><li>In the server mode, when reading from a CLOB or BLOB, if the connection
was closed, a NullPointerException could be thrown instead of an exception saying
the connection is closed.
</li><li>DatabaseMetaData.getProcedures and getProcedureColumns
could throw an exception if a user defined class is not available.
</li><li>Issue 584: the error message for a wrong sequence definition was wrong.
</li><li>CSV tool: the rowSeparator option is no longer supported,
as the same can be achieved with the lineSeparator.
</li><li>Descending indexes on MVStore tables did not work properly.
......
......@@ -67,7 +67,7 @@ For details about changes, see the <a href="changelog.html">Change Log</a>.
<p>
<a href="http://www.h2database.com/html/newsfeed-atom.xml">Atom Feed</a><br />
<a href="http://www.h2database.com/html/newsfeed-rss.xml">RSS Feed</a><br />
<a href="http://www.h2database.com/html/doap-h2.rdf">DOAP File</a> (<a href="http://trac.usefulinc.com/doap">what is this</a>)
<a href="http://www.h2database.com/html/doap-h2.rdf">DOAP File</a> (<a href="http://en.wikipedia.org/wiki/DOAP">what is this</a>)
</p>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
......@@ -69,7 +69,7 @@ Here is the list of known and confirmed issues:
timezone. This problem does not occur when using the system property "h2.storeLocalTime"
(however such database files are not compatible with older versions of H2).
</li><li>Apache Harmony: there seems to be a bug in Harmony that affects H2.
See <a href="https://issues.apache.org/jira/browse/HARMONY-6505">HARMONY-6505</a>.
See <a href="http://issues.apache.org/jira/browse/HARMONY-6505">HARMONY-6505</a>.
</li><li>Tomcat and Glassfish 3 set most static fields (final or non-final) to <code>null</code> when
unloading a web application. This can cause a <code>NullPointerException</code> in H2 versions
1.1.107 and older, and may still not work in newer versions. Please report it if you
......
......@@ -322,14 +322,14 @@ Some ideas are:
<a href="http://www.cementframework.org">Cement Framework</a><br />
<a href="http://code.google.com/p/dreamsource-orm">Dreamsource ORM</a><br />
<a href="http://incubator.apache.org/empire-db/empiredb/empiredb.htm">Empire-db</a><br />
<a href="http://www.jequel.de">JEQUEL: Java Embedded QUEry Language</a><br />
<a href="http://jequel.jexp.de">JEQUEL: Java Embedded QUEry Language</a><br />
<a href="http://joist.ws">Joist</a><br />
<a href="http://www.jooq.org">jOOQ</a><br />
<a href="http://josql.sourceforge.net">JoSQL</a><br />
<a href="http://code.google.com/p/liquidform">LIQUidFORM</a><br />
<a href="http://svn.quaere.codehaus.org/browse/~raw,r=76/quaere/trunk/Quaere/src/test/java/org/quaere/alias/test/SamplesTest.java">Quaere (Alias implementation)</a><br />
<a href="http://quaere.codehaus.org/">Quaere</a><br />
<a href="http://source.mysema.com/display/querydsl/Querydsl">Querydsl</a><br />
<a href="http://www.querydsl.com">Querydsl</a><br />
<a href="http://java.net/projects/squill">Squill</a><br />
</p>
......
......@@ -71,8 +71,8 @@ h2osgi: OSGi for the H2 Database</a>
<a href="http://code.google.com/p/h2sharp">
H2Sharp: ADO.NET interface for the H2 database engine</a>
<br />
<a href="http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download">
H2 Spatial: spatial functions to H2 database</a>
<a href="http://www.h2gis.org">
A spatial extension of the H2 database.</a>
<h2 id="blog">Blog Articles, Videos</h2>
<a href="http://www.youtube.com/watch?v=mlWM0r3SKkg">
......@@ -85,20 +85,14 @@ Efficient sorting and iteration on large databases (2009-06-15)</a><br />
Porting Flexive to the H2 Database (2008-12-05)</a><br />
<a href="http://blogs.sun.com/theaquarium/entry/h2_database_with_glassfish">
H2 Database with GlassFish (2008-11-24)</a><br />
<a href="http://www.marciowb.net/blog/2008/08/quickly-using-h2-database-with">
Using H2 Database with Glassfish and Toplink (2008-08-07)</a><br />
<a href="http://zvikico.typepad.com/problog/2008/04">
H2 Database - Performance Tracing (2008-04-30)</a><br />
<a href="http://www.bluedevel.com/blog/?p=12">
Testing your JDBC data access layer with DBUnit and H2 (2007-09-18)</a><br />
<a href="http://www.encorewiki.org/display/encore/Open+Source+Databases+Comparison">
Open Source Databases Comparison (2007-09-11)</a><br />
<a href="http://thecodist.com/fiche/thecodist/article/the-open-source-frameworks-i-use">
The Codist: The Open Source Frameworks I Use (2007-07-23)</a><br />
<a href="http://thecodist.com/fiche/thecodist/article/sql-injections-how-not-to-get-stuck">
The Codist: SQL Injections: How Not To Get Stuck (2007-05-08)</a><br />
<a href="http://manichord.com/blog/2007/05/helma-h2-to-easy.html">
One Man Band: (Helma + H2) == "to easy" (2007-03-11)</a><br />
<a href="http://blogs.sun.com/coldrick/entry/new_version_of_h2_database">
David Coldrick's Weblog: New Version of H2 Database Released (2007-01-06)</a><br />
<a href="http://thecodist.com/fiche/thecodist/article/write-your-own-database-again-an-interview-with-the-author-of-h2-thomas-mueller">
......@@ -109,8 +103,6 @@ The Codist: Write Your Own Database, Again (2006-11-13)</a><br />
Ohloh</a><br />
<a href="http://freshmeat.net/projects/h2">
Freshmeat Project Page</a><br />
<a href="http://fossfor.us/software/name/H2_Database">
Free Open Source Software For Us</a><br />
<a href="http://en.wikipedia.org/wiki/H2_%28DBMS%29">
Wikipedia</a><br />
<a href="http://java-source.net/open-source/database-engines/h2">
......@@ -155,7 +147,7 @@ HenPlus</a><br />
HenPlus is a SQL shell written in Java.
</p>
<p><a href="https://github.com/maginatics/jdbclint">
<p><a href="http://github.com/maginatics/jdbclint">
JDBC lint</a><br />
Helps write correct and efficient code when using the JDBC API.
</p>
......@@ -242,11 +234,6 @@ BGBlitz</a><br />
The Swiss army knife of Backgammon.
</p>
<p><a href="http://wiki.blojsom.com">
Blojsom</a><br />
Java-based multi-blog, multi-user software package (Mac OS X Weblog Server).
</p>
<p><a href="http://wiki.bonita.ow2.org/xwiki/bin/view/Main">
Bonita</a><br />
Open source workflow solution for handing long-running, user-oriented processes
......@@ -268,6 +255,11 @@ CrashPlan PRO Server</a><br />
Easy and cross platform backup solution for business and service providers.
</p>
<p><a href="http://www.datanucleus.org">
DataNucleus</a><br />
Java persistent objects.
</p>
<p><a href="http://dbunit.wikidot.com">
DbUnit</a><br />
A JUnit extension (also usable with Ant) targeted for database-driven projects.
......@@ -301,11 +293,6 @@ The CDO (Connected Data Objects) Model Repository is a distributed shared model
and a fast server-based O/R mapping solution.
</p>
<p><a href="http://antilogics.com/epictetus.html">
Epictetus</a><br />
Free cross platform database tool.
</p>
<p><a href="http://fabric3.codehaus.org">
Fabric3</a><br />
Fabric3 is a project implementing a federated service network based on the Service Component Architecture specification (http://www.osoa.org).
......@@ -360,11 +347,6 @@ HA-JDBC</a><br />
High-Availability JDBC: A JDBC proxy that provides light-weight, transparent, fault tolerant clustering capability to any underlying JDBC driver.
</p>
<p><a href="http://coolharbor.100free.com/index.htm">
Harbor</a><br />
Pojo Application Server.
</p>
<p><a href="http://hibernate.org">
Hibernate</a><br />
Relational persistence for idiomatic Java (O-R mapping tool).
......@@ -387,11 +369,6 @@ JAMWiki</a><br />
Java-based Wiki engine.
</p>
<p><a href="http://dev.orf.at/trac/jala">
Jala</a><br />
Open source collection of JavaScript modules.
</p>
<p><a href="http://jaspa.upv.es">
Jaspa</a><br />
Java Spatial. Jaspa potentially brings around 200 spatial functions.
......@@ -438,16 +415,6 @@ jOOQ (Java Object Oriented Querying)</a><br />
jOOQ is a fluent API for typesafe SQL query construction and execution
</p>
<p><a href="http://getjotbot.com">
JotBot</a><br />
Records your day at user defined intervals.
</p>
<p><a href="http://www.jpox.org">
JPOX</a><br />
Java persistent objects.
</p>
<p><a href="http://code.google.com/p/liftweb">
Liftweb</a><br />
A Scala-based, secure, developer friendly web framework.
......@@ -489,12 +456,12 @@ Myna Application Server</a><br />
Java web app that provides dynamic web content and Java libraries access from JavaScript.
</p>
<p><a href="http://docs.codewave.de/mytunesrss3">
<p><a href="http://www.codewave.de/mytunesrss.php">
MyTunesRss</a><br />
MyTunesRSS lets you listen to your music wherever you are.
</p>
<p><a href="http://ncgc.nih.gov/pub/openhts">
<p><a href="http://www.ncats.nih.gov/research/tools/preclinical/preclinical-research-tools.html">
NCGC CurveFit</a><br />
From: NIH Chemical Genomics Center, National Institutes of Health, USA.
An open source application in the life sciences research field. This
......@@ -545,11 +512,6 @@ Open Anzo</a><br />
Semantic Application Server.
</p>
<p><a href="http://telegard.org/about">
OpenTelegard</a><br />
An OpenSource BBS Software written in JRuby.
</p>
<p><a href="http://www.opengroove.org">
OpenGroove</a><br />
OpenGroove is a groupware program that allows users to synchronize data.
......@@ -611,11 +573,6 @@ RIFE</a><br />
A full-stack web application framework with tools and APIs to implement most common web features.
</p>
<p><a href="http://patir.rubyforge.org/rutema/index.html">
Rutema</a><br />
Rutema is a test execution and management tool for heterogeneous development environments written in Ruby.
</p>
<p><a href="http://scriptella.javaforge.com">
Sava</a><br />
Open-source web-based content management system.
......@@ -735,7 +692,7 @@ Werkzeugkasten</a><br />
Minimum Java Toolset.
</p>
<p><a href="http://www.vpda.org">
<p><a href="http://vpda.org/">
VPDA</a><br />
View providers driven applications is a Java based application framework
for building applications composed from server components - view providers.
......@@ -746,10 +703,5 @@ Volunteer database</a><br />
A database front end to register volunteers, partnership and donation for a Non Profit organization.
</p>
<p><a href="http://www.webaura.fr">
974 Application Server</a><br />
A clusterable application server.
</p>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......@@ -483,7 +483,7 @@ The file contains two file headers (for safety), and a number of chunks.
The file headers are one block each; a block is 4096 bytes.
Each chunk is at least one block, but typically 200 blocks or more.
Data is stored in the chunks in the form of a
<a href="https://en.wikipedia.org/wiki/Log-structured_file_system">log structured storage</a>.
<a href="http://en.wikipedia.org/wiki/Log-structured_file_system">log structured storage</a>.
There is one chunk for every version.
</p>
<pre>
......@@ -545,14 +545,14 @@ Each value is stored as a hexadecimal number. The entries are:
</li><li>block: The block number where one of the newest chunks starts
(but not necessarily the newest).
</li><li>blockSize: The block size of the file; currently always hex 1000, which is decimal 4096,
to match the <a href="https://en.wikipedia.org/wiki/Disk_sector">disk sector</a>
to match the <a href="http://en.wikipedia.org/wiki/Disk_sector">disk sector</a>
length of modern hard disks.
</li><li>chunk: The chunk id, which is normally the same value as the version;
however, the chunk id might roll over to 0, while the version doesn't.
</li><li>created: The number of milliseconds since 1970 when the file was created.
</li><li>format: The file format number. Currently 1.
</li><li>version: The version number of the chunk.
</li><li>fletcher: The <a href="https://en.wikipedia.org/wiki/Fletcher's_checksum">
</li><li>fletcher: The <a href="http://en.wikipedia.org/wiki/Fletcher's_checksum">
Fletcher-32 checksum</a> of the header.
</li></ul>
<p>
......@@ -609,7 +609,7 @@ plus all the parent nodes of those pages, recursively, up to the root page.
If an entry in a map is changed, removed, or added, then the respective page is copied,
modified, and stored in the next chunk, and the number of live pages in the old chunk is decremented.
This mechanism is called copy-on-write, and is similar to how the
<a href="https://en.wikipedia.org/wiki/Btrfs">Btrfs</a> file system works.
<a href="http://en.wikipedia.org/wiki/Btrfs">Btrfs</a> file system works.
Chunks without live pages are marked as free, so the space can be re-used by more recent chunks.
Because not all chunks are of the same size, there can be a number of free blocks in front of a chunk
for some time (until a small chunk is written or the chunks are compacted).
......@@ -635,14 +635,14 @@ In any case, the file header is updated if the next chain gets longer than 20 ho
<h3>Page Format</h3>
<p>
Each map is a <a href="https://en.wikipedia.org/wiki/B-tree">B-tree</a>,
Each map is a <a href="http://en.wikipedia.org/wiki/B-tree">B-tree</a>,
and the map data is stored in (B-tree-) pages.
There are leaf pages that contain the key-value pairs of the map,
and internal nodes, which only contain keys and pointers to leaf pages.
The root of a tree is either a leaf or an internal node.
Unlike file header and chunk header and footer, the page data is not human readable.
Instead, it is stored as byte arrays, with long (8 bytes), int (4 bytes), short (2 bytes),
and <a href="https://en.wikipedia.org/wiki/Variable-length_quantity">variable size int and long</a>
and <a href="http://en.wikipedia.org/wiki/Variable-length_quantity">variable size int and long</a>
(1 to 5 / 10 bytes). The page format is:
</p>
<ul><li>length (int): Length of the page in bytes.
......
......@@ -26,6 +26,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Remove "set binary collation" feature.
</li><li>Remove the encryption algorithm XTEA.
</li><li>Disallow referencing other tables in a table (via constraints for example).
</li><li>Remove PageStore features like compress_lob.
</li></ul>
<h2>Version 1.4.x: Planned Changes</h2>
......@@ -196,7 +197,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>MySQL compatibility: update test1 t1, test2 t2 set t1.id = t2.id where t1.id = t2.id;
</li><li>Ability to resize the cache array when resizing the cache
</li><li>Time based cache writing (one second after writing the log)
</li><li>Check state of H2 driver for DDLUtils: https://issues.apache.org/jira/browse/DDLUTILS-185
</li><li>Check state of H2 driver for DDLUtils: http://issues.apache.org/jira/browse/DDLUTILS-185
</li><li>Index usage for REGEXP LIKE.
</li><li>Compatibility: add a role DBA (like ADMIN).
</li><li>Better support multiple processors for in-memory databases.
......@@ -396,7 +397,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Pluggable access control mechanism.
</li><li>Fulltext search (Lucene): support streaming CLOB data.
</li><li>Document/example how to create and read an encrypted script file.
</li><li>Check state of https://issues.apache.org/jira/browse/OPENJPA-1367 (H2 does support cross joins).
</li><li>Check state of http://issues.apache.org/jira/browse/OPENJPA-1367 (H2 does support cross joins).
</li><li>Fulltext search (Lucene): only prefix column names with _ if they already start with _. Instead of DATA / QUERY / modified use _DATA, _QUERY, _MODIFIED if possible.
</li><li>Support a way to create or read compressed encrypted script files using an API.
</li><li>Scripting language support (Javascript).
......
......@@ -1388,7 +1388,7 @@ There is an incompatibility with the Spring JdbcTemplate and H2 version 1.3.154
because of a change in the error code. This will cause the JdbcTemplate to not detect
a duplicate key condition, and so a <code>DataIntegrityViolationException</code> is thrown instead of
<code>DuplicateKeyException</code>.
See also <a href="https://jira.springsource.org/browse/SPR-8235">the issue SPR-8235</a>.
See also <a href="http://jira.spring.io/browse/SPR-8235">the issue SPR-8235</a>.
The workaround is to add the following XML file to the root of the classpath:
</p>
<pre>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论