提交 ef57ec15 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved documentation.

上级 c036f1b3
......@@ -885,6 +885,8 @@ is 16384 (16 MB). The value is rounded to the next higher power of two.
Depending on the virtual machine, the actual memory required may be higher.
This setting is persistent and affects all connections as there is only one cache per database.
This setting only affects the database engine (the server in a client/server environment).
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
......
......@@ -38,6 +38,10 @@ Build
This database is written in Java and therefore works on many platforms.
It can also be compiled to a native executable using GCJ.
</p>
<p>
For Java 1.4, the jar file needs to be converted first using
<a href="http://retrotranslator.sourceforge.net">Retrotranslator</a>.
</p>
<h2 id="environment">Environment</h2>
<p>
......
......@@ -18,7 +18,11 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>-
<ul><li>Improved error messages: identifiers and values are now quoted.
</li><li>Improved error message when casting a value failed:
the column name and type is included in the message.
</li><li>Page store: inserting very large rows failed with ArrayIndexOutOfBoundsException.
</li><li>Improved support for GAE for Java thanks to Vince Bonfanti.
</li></ul>
<h2>Version 1.2.122 (2009-10-28)</h2>
......
......@@ -55,29 +55,35 @@ translate -->
</form>
<div class="menu">
<b><a href="main.html">Home</a></b><br />
<a href="quickstart.html">Quickstart</a><br />
<a href="download.html">Download</a><br />
<a href="cheatSheet.html">Cheat Sheet</a><br />
<br />
<b>Documentation</b><br />
<a href="quickstart.html">Quickstart</a><br />
<a href="installation.html">Installation</a><br />
<a href="tutorial.html">Tutorial</a><br />
<a href="features.html">Features</a><br />
<a href="performance.html">Performance</a><br />
<a href="advanced.html">Advanced</a><br />
<a href="jaqu.html">JaQu</a><br />
<a href="download.html">Download</a><br />
<br />
<b> Reference </b><br />
<b>Reference</b><br />
<a href="grammar.html">SQL Grammar</a><br />
<a href="functions.html">Functions</a><br />
<a href="datatypes.html">Data Types</a><br />
<a href="../javadoc/index.html">Javadoc</a><br />
<a href="sourceError.html">Error Analyzer</a><br />
<a href="../h2.pdf">PDF (1 MB)</a><br />
<br />
<b> Appendix </b><br />
<b>Support</b><br />
<a href="faq.html">FAQ</a><br />
<a href="sourceError.html">Error Analyzer</a><br />
<a href="http://groups.google.com/group/h2-database">Google Group (English)</a><br />
<a href="http://groups.google.co.jp/group/h2-database-jp">Google Group (Japanese)</a><br />
<br />
<b>Appendix</b><br />
<a href="jaqu.html">JaQu</a><br />
<a href="build.html">Build</a><br />
<a href="history.html">History &amp; Roadmap</a><br />
<a href="links.html">Links</a><br />
<a href="faq.html">FAQ</a><br />
<a href="license.html">License</a><br />
<br />
......
......@@ -54,6 +54,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Support alter table add column if table has views defined
</li><li>Support hints for the optimizer (which index to use, enforce the join order).
</li><li>Change LOB mechanism (less files, keep index of lob files, point to files and row, delete unused files earlier, maybe bundle files into a tar file)
</li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger.
</li><li>Clustering: recovery needs to becomes fully automatic. Global write lock feature.
</li><li>Support mixed clustering mode (one embedded, others in server mode)
</li><li>Sequence: add features [NO] MINVALUE, MAXVALUE, CYCLE
......@@ -61,6 +62,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</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>Automatic collection of statistics (auto ANALYZE)
</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
......@@ -100,7 +102,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Include SMPT (mail) server (at least client) (alert on cluster failure, low disk space,...)
</li><li>Drop with restrict (currently cascade is the default)
</li><li>JSON parser and functions
</li><li>Automatic collection of statistics (auto ANALYZE)
</li><li>Server: client ping from time to time (to avoid timeout - is timeout a problem?)
</li><li>Copy database: tool with config GUI and batch mode, extensible (example: compare)
</li><li>Document, implement tool for long running transactions using user-defined compensation statements.
......@@ -244,7 +245,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Access rights: finer grained access control (grant access for specific functions)
</li><li>Support N'text'
</li><li>Pure SQL triggers (example: update parent table if the child table is changed).
</li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger
</li><li>In MySQL mode, for AUTO_INCREMENT columns, don't set the primary key
</li><li>Use JDK 1.4 file locking to create the lock file (but not yet by default); writing a system property to detect concurrent access from the same VM (different classloaders).
</li><li>Support compatibility for jdbc:hsqldb:res:
......@@ -465,6 +465,9 @@ 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>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></ul>
<h2>Not Planned</h2>
......
......@@ -30,6 +30,8 @@ Tutorial
Using Hibernate</a><br />
<a href="#using_toplink">
Using TopLink and Glassfish</a><br />
<a href="#using_eclipselink">
Using EclipseLink</a><br />
<a href="#web_applications">
Using Databases in Web Applications</a><br />
<a href="#csv">
......@@ -380,6 +382,13 @@ To enable it, change the following setting in persistence.xml:
In old versions of Glassfish, the property name is <code>toplink.platform.class.name</code>.
</p>
<h2 id="using_eclipselink">Using EclipseLink</h2>
<p>
To use H2 in EclipseLink, use the platform class <code>org.eclipse.persistence.platform.database.H2Platform</code>.
If this platform is not available in your version of EclipseLink, you can use the OraclePlatform instead in many case.
See also <a href="http://wiki.eclipse.org/EclipseLink/Development/Incubator/Extensions/H2Platform">H2Platform</a>.
</p>
<h2 id="web_applications">Using Databases in Web Applications</h2>
<p>
There are multiple ways to access a database from within web
......
......@@ -9,6 +9,7 @@ package org.h2.test.mvcc;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Random;
import org.h2.test.TestBase;
......@@ -27,18 +28,64 @@ public class TestMvccMultiThreaded extends TestBase {
}
public void test() throws Exception {
if (!config.mvcc) {
return;
// testConcurrentMerge();
testConcurrentUpdate("");
// not supported currently
// testConcurrentUpdate(";MULTI_THREADED=TRUE");
}
private void testConcurrentMerge() throws Exception {
deleteDb("mvccMultiThreaded");
int len = 10;
final Connection[] connList = new Connection[len];
for (int i = 0; i < len; i++) {
Connection conn = getConnection("mvccMultiThreaded;MVCC=TRUE");
connList[i] = conn;
}
Connection conn = connList[0];
conn.createStatement().execute("create table test(id int primary key, value int)");
final SQLException[] ex = new SQLException[1];
Thread[] threads = new Thread[len];
final boolean[] stop = new boolean[1];
for (int i = 0; i < len; i++) {
final Connection c = connList[i];
c.setAutoCommit(false);
threads[i] = new Thread() {
public void run() {
Random random = new Random();
while (!stop[0]) {
try {
int k = random.nextInt(100);
c.createStatement().execute("merge into test values(" + k + ", " + k + ")");
c.commit();
} catch (SQLException e) {
ex[0] = e;
}
if (config.mvcc) {
// not supported at this time
return;
}
}
};
threads[i].start();
}
Thread.sleep(1000);
stop[0] = true;
for (int i = 0; i < len; i++) {
threads[i].join();
}
if (ex[0] != null) {
throw ex[0];
}
for (int i = 0; i < len; i++) {
connList[i].close();
}
deleteDb("mvccMultiThreaded");
}
private void testConcurrentUpdate(String suffix) throws Exception {
deleteDb("mvccMultiThreaded");
int len = 2;
final Connection[] connList = new Connection[len];
for (int i = 0; i < len; i++) {
connList[i] = getConnection("mvccMultiThreaded;MULTI_THREADED=TRUE");
connList[i] = getConnection("mvccMultiThreaded;MVCC=TRUE" + suffix);
}
Connection conn = connList[0];
conn.createStatement().execute("create table test(id int primary key, value int)");
......
......@@ -15,7 +15,7 @@ Can not reproduce:
Hi,
Sorry I can not reproduce this problem. Could you post a simple, standalone test case that reproduces the problem? It would be great if the test case does not have any dependencies except the H2 jar file (that is, a simple SQL script that can be run in the H2 Console, or a Java class uses the JDBC API and is run using a static main method). Please include any initialization code (CREATE TABLE, INSERT and so on) in the Java class or in a .sql script file.
Sorry I can not reproduce this problem. Could you post a simple, standalone test case that reproduces the problem? It would be great if the test case does not have any dependencies except the H2 jar file (that is, a simple SQL script that can be run in the H2 Console, or a Java class uses the JDBC API and is run using a static main method). If the test case does have dependencies it would help a lot if you upload them somewhere (for example Rapidshare.com). Please include any initialization code (CREATE TABLE, INSERT and so on) in the Java class or in a .sql script file.
Regards,
Thomas
......
......@@ -618,4 +618,4 @@ notranslate vince bonfanti alphabetically sysdummy sysibm activation
deactivation concatenating reproducing black railroads railroad radius moz
imageio argb bilinear rendering stroke interpolation flip diagrams draw
delim overlap subselect bitwise dclassifier dgenerate compacts chartrand phane
sval cement
sval cement slave ulimit eclipselink glenn kidd rapidshare
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论