提交 88299ab9 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation: added notranslate tags

上级 74d34875
...@@ -67,9 +67,9 @@ Newer version or compatible software works too. ...@@ -67,9 +67,9 @@ Newer version or compatible software works too.
<h2 id="building">Building the Software</h2> <h2 id="building">Building the Software</h2>
<p> <p>
You need to install a JDK, for example the Sun JDK version 1.5 or 1.6. You need to install a JDK, for example the Sun JDK version 1.5 or 1.6.
Ensure that Java binary directory is included in the PATH environment variable, and that Ensure that Java binary directory is included in the <code class="notranslate">PATH</code> environment variable, and that
the environment variable JAVA_HOME points to your Java installation. the environment variable <code class="notranslate">JAVA_HOME</code> points to your Java installation.
On the command line, go to the directory h2 and execute the following command: On the command line, go to the directory <code class="notranslate">h2</code> and execute the following command:
</p> </p>
<pre class="notranslate"> <pre class="notranslate">
build -? build -?
...@@ -98,13 +98,18 @@ build switchSource ...@@ -98,13 +98,18 @@ build switchSource
<p> <p>
The build system can generate smaller jar files as well. The following targets are currently supported: The build system can generate smaller jar files as well. The following targets are currently supported:
</p> </p>
<ul><li>jarClient creates the h2client.jar. This only contains the JDBC client. <ul><li><code class="notranslate">jarClient</code>
</li><li>jarSmall creates the file h2small.jar. This only contains the embedded database. Debug information is disabled. creates the file <code class="notranslate">h2client.jar</code>. This only contains the JDBC client.
</li><li>jarJaqu creates the file h2jaqu.jar. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu. </li><li><code class="notranslate">jarSmall</code>
</li><li>javadocImpl creates the Javadocs of the implementation. creates the file <code class="notranslate">h2small.jar</code>.
This only contains the embedded database. Debug information is disabled.
</li><li><code class="notranslate">jarJaqu</code>
creates the file <code class="notranslate">h2jaqu.jar</code>.
This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
</li><li><code class="notranslate">javadocImpl</code> creates the Javadocs of the implementation.
</li></ul> </li></ul>
<p> <p>
To create the h2client.jar file, go to the directory h2 and execute the following command: To create the file <code class="notranslate">h2client.jar</code>, go to the directory h2 and execute the following command:
</p> </p>
<pre class="notranslate"> <pre class="notranslate">
build jarClient build jarClient
...@@ -132,7 +137,7 @@ they are available there. ...@@ -132,7 +137,7 @@ they are available there.
<h3>Using Snapshot Version</h3> <h3>Using Snapshot Version</h3>
<p> <p>
To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command: To build a 'snapshot' H2 jar file and upload it the to the local Maven 2 repository, execute the following command:
</p> </p>
<pre class="notranslate"> <pre class="notranslate">
build mavenInstallLocal build mavenInstallLocal
...@@ -154,14 +159,16 @@ Afterwards, you can include the database in your Maven 2 project as a dependency ...@@ -154,14 +159,16 @@ Afterwards, you can include the database in your Maven 2 project as a dependency
The translation of this software is split into the following parts: The translation of this software is split into the following parts:
</p> </p>
<ul> <ul>
<li>H2 Console: src/main/org/h2/server/web/res/_text_*.properties <li>H2 Console: <code class="notranslate">src/main/org/h2/server/web/res/_text_*.properties</code>
</li><li>Error messages: src/main/org/h2/res/_messages_*.properties </li><li>Error messages: <code class="notranslate">src/main/org/h2/res/_messages_*.properties</code>
</li><li>Web site: src/docsrc/text/_docs_*.utf8.txt </li><li>Web site: <code class="notranslate">src/docsrc/text/_docs_*.utf8.txt</code>
</li></ul> </li></ul>
<p> <p>
To translate the H2 Console, start it and select Preferences / Translate. To translate the H2 Console, start it and select Preferences / Translate.
The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (&amp;#..;) The conversion between UTF-8 and Java encoding (using the <code class="notranslate">\u</code> syntax),
is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, as well as the HTML entities (<code class="notranslate">&amp;#..;</code>)
is automated by running the tool <code class="notranslate">PropertiesToUTF8</code>.
The web site translation is automated as well,
using <code class="notranslate">build docs</code>. using <code class="notranslate">build docs</code>.
</p> </p>
...@@ -176,18 +183,23 @@ If you like to provide patches, please consider the following guidelines to simp ...@@ -176,18 +183,23 @@ If you like to provide patches, please consider the following guidelines to simp
The checkstyle configuration is in <code class="notranslate">src/installer/checkstyle.xml</code>. The checkstyle configuration is in <code class="notranslate">src/installer/checkstyle.xml</code>.
</li><li>Please provide test cases and integrate them into the test suite. </li><li>Please provide test cases and integrate them into the test suite.
For Java level tests, see <code class="notranslate">src/test/org/h2/test/TestAll.java</code>. For Java level tests, see <code class="notranslate">src/test/org/h2/test/TestAll.java</code>.
For SQL level tests, see <code class="notranslate">src/test/org/h2/test/test.in.txt</code> or <code class="notranslate">testSimple.in.txt</code>. For SQL level tests, see <code class="notranslate">src/test/org/h2/test/test.in.txt</code> or
</li><li>The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above). <code class="notranslate">testSimple.in.txt</code>.
or use the build target 'coverage'. </li><li>The test cases should cover at least 90% of the changed and new code;
</li><li>Verify that you did not break other features: run the test cases by executing <code class="notranslate">build test</code>. use a code coverage tool to verify that (see above).
or use the build target <code class="notranslate">coverage</code>.
</li><li>Verify that you did not break other features: run the test cases by executing
<code class="notranslate">build test</code>.
</li><li>Provide end user documentation if required (<code class="notranslate">src/docsrc/html/*</code>). </li><li>Provide end user documentation if required (<code class="notranslate">src/docsrc/html/*</code>).
</li><li>Document grammar changes in <code class="notranslate">src/main/org/h2/res/help.csv</code> </li><li>Document grammar changes in <code class="notranslate">src/main/org/h2/res/help.csv</code>
</li><li>Provide a change log entry (<code class="notranslate">src/docsrc/html/changelog.html</code>). </li><li>Provide a change log entry (<code class="notranslate">src/docsrc/html/changelog.html</code>).
</li><li>Verify the spelling using <code class="notranslate">build spellcheck</code>. If required </li><li>Verify the spelling using <code class="notranslate">build spellcheck</code>. If required
add the new words to <code class="notranslate">src/tools/org/h2/build/doc/dictionary.txt</code>. add the new words to <code class="notranslate">src/tools/org/h2/build/doc/dictionary.txt</code>.
</li><li>Run the src/installer/buildRelease to find and fix formatting errors. </li><li>Run the <code class="notranslate">src/installer/buildRelease</code> to find and fix formatting errors.
</li><li>Verify the formatting using <code class="notranslate">build docs</code> and <code class="notranslate">build javadoc</code>. </li><li>Verify the formatting using <code class="notranslate">build docs</code> and
</li><li>Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch. <code class="notranslate">build javadoc</code>.
</li><li>Submit patches as <code class="notranslate">.patch</code> files (compressed if big).
To create a patch using Eclipse, use Team / Create Patch.
</li></ul> </li></ul>
<p> <p>
For legal reasons, patches need to be public in the form of an email to the For legal reasons, patches need to be public in the form of an email to the
......
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>If a database in the old format exists, it is now used. <ul><li>Better support GaeVFS (Google App Engine Virtual File System) thanks to Thanks to Vince Bonfanti.
</li><li>CSVREAD: the function didn't close the file. Thanks to Vince Bonfanti for the patch!
</li><li>If a database in the old format exists, it is now used.
The system property is used for new databases, or if databases exist The system property is used for new databases, or if databases exist
in both formats. In any case, the flag in the URL overrides this logic. in both formats. In any case, the flag in the URL overrides this logic.
</li><li>Page store: large values in indexed columns could corrupt the index. </li><li>Page store: large values in indexed columns could corrupt the index.
......
...@@ -47,18 +47,20 @@ Usually, bugs get fixes as they are found. There is a release every few weeks. ...@@ -47,18 +47,20 @@ Usually, bugs get fixes as they are found. There is a release every few weeks.
Here is the list of known and confirmed issues: Here is the list of known and confirmed issues:
</p> </p>
<ul><li>Tomcat and Glassfish 3 set most static fields (final or non-final) to null when <ul><li>Tomcat and Glassfish 3 set most static fields (final or non-final) to null when
unloading a web application. This can cause a NullPointerException in H2 versions unloading a web application. This can cause a <code class="notranslate">NullPointerException</code> in H2 versions
1.1.107 and older, and may still not work in newer versions. Please report it if you 1.1.107 and older, and may still not work in newer versions. Please report it if you
run into this issue. In Tomcat >= 6.0 this behavior can be disabled by setting the run into this issue. In Tomcat >= 6.0 this behavior can be disabled by setting the
system property org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES system property <code class="notranslate">org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES</code>
to false, however Tomcat may then run out of memory. A known workaround is to to false, however Tomcat may then run out of memory. A known workaround is to
put the h2.jar file in a shared <code class="notranslate">lib</code> directory (common/lib). put the h2.jar file in a shared <code class="notranslate">lib</code> directory
(<code class="notranslate">common/lib</code>).
</li><li>Some problems have been found with right outer join. Internally, it is converted </li><li>Some problems have been found with right outer join. Internally, it is converted
to left outer join, which does not always produce the same results as other databases to left outer join, which does not always produce the same results as other databases
when used in combination with other joins. when used in combination with other joins.
</li><li>When using Install4j before 4.1.4 on Linux and enabling 'pack200', </li><li>When using Install4j before 4.1.4 on Linux and enabling 'pack200',
the h2*.jar becomes corrupted by the install process, causing application failure. the <code class="notranslate">h2*.jar</code> becomes corrupted by the install process, causing application failure.
A workaround is to add an empty file h2*.jar.nopack next to the h2*.jar file. A workaround is to add an empty file <code class="notranslate">h2*.jar.nopack</code>
next to the <code class="notranslate">h2*.jar</code> file.
This problem is solved in Install4j 4.1.4. This problem is solved in Install4j 4.1.4.
</li></ul> </li></ul>
...@@ -72,13 +74,15 @@ See also under license. ...@@ -72,13 +74,15 @@ See also under license.
<br /> <br />
<h3 id="query_slow">My Query is Slow</h3> <h3 id="query_slow">My Query is Slow</h3>
<p> <p>
Slow SELECT (or DELETE, UPDATE, MERGE) statement can have multiple reasons. Slow <code class="notranslate">SELECT</code> (or <code class="notranslate">DELETE, UPDATE, MERGE</code>)
Follow this checklist: statement can have multiple reasons. Follow this checklist:
</p> </p>
<ul> <ul>
<li>Run ANALYZE (see documentation for details). <li>Run <code class="notranslate">ANALYZE</code> (see documentation for details).
</li><li>Run the query with EXPLAIN and check if indexes are used (see documentation for details). </li><li>Run the query with <code class="notranslate">EXPLAIN</code> and check if indexes are used
</li><li>If required, create additional indexes and try again using ANALYZE and EXPLAIN. (see documentation for details).
</li><li>If required, create additional indexes and try again using
<code class="notranslate">ANALYZE</code> and <code class="notranslate">EXPLAIN</code>.
</li><li>If it doesn't help please report the problem. </li><li>If it doesn't help please report the problem.
</li> </li>
</ul> </ul>
...@@ -104,13 +108,18 @@ Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", ""); ...@@ -104,13 +108,18 @@ Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
<br /> <br />
<h3 id="database_files">Where are the Database Files Stored?</h3> <h3 id="database_files">Where are the Database Files Stored?</h3>
<p> <p>
When using database URLs like <code class="notranslate">jdbc:h2:~/test</code>, the database is stored in the user directory. When using database URLs like <code class="notranslate">jdbc:h2:~/test</code>,
For Windows, this is usually C:\Documents and Settings\&lt;userName&gt;". the database is stored in the user directory.
If the base directory is not set (as in <code class="notranslate">jdbc:h2:test</code>), the database files are stored in the directory where the application is started For Windows, this is usually C:\Documents and Settings\&lt;userName&gt;.
(the current working directory). When using the H2 Console application from the start menu, this is "&lt;Installation Directory&gt;/bin". If the base directory is not set (as in <code class="notranslate">jdbc:h2:test</code>),
the database files are stored in the directory where the application is started
(the current working directory). When using the H2 Console application from the start menu,
this is "&lt;Installation Directory&gt;/bin".
The base directory can be set in the database URL. A fixed or relative path can be used. When using the URL The base directory can be set in the database URL. A fixed or relative path can be used. When using the URL
jdbc:h2:file:data/sample, the database is stored in the directory "data" (relative to the current working directory). <code class="notranslate">jdbc:h2:file:data/sample</code>, the database is stored in the directory
The directory is created automatically if it does not yet exist. It is also possible to use the fully qualified directory name (and for Windows, drive name). <code class="notranslate">data</code> (relative to the current working directory).
The directory is created automatically if it does not yet exist. It is also possible to use the
fully qualified directory name (and for Windows, drive name).
Example: <code class="notranslate">jdbc:h2:file:C:/data/test</code> Example: <code class="notranslate">jdbc:h2:file:C:/data/test</code>
</p> </p>
...@@ -125,9 +134,10 @@ See <a href="advanced.html#limits_limitations">Limits and Limitations</a>. ...@@ -125,9 +134,10 @@ See <a href="advanced.html#limits_limitations">Limits and Limitations</a>.
<p> <p>
Some users have reported that after a power failure, the database can sometimes not be Some users have reported that after a power failure, the database can sometimes not be
opened because the index file is corrupt. In that case, the index file can be deleted opened because the index file is corrupt. In that case, the index file can be deleted
(it is automatically re-created). To avoid this, append ;LOG=2 to the database URL. (it is automatically re-created). To avoid this, append
See also: <a href="grammar.html#set_log">SET LOG</a>. This problem will be solved <code class="notranslate">;LOG=2</code> to the database URL.
using the new 'page store' mechanism (currently experimental). See also: <a href="grammar.html#set_log" class="notranslate">SET LOG</a>. This problem will be solved
using the new 'page store' mechanism (currently beta).
</p> </p>
<p> <p>
That is not easy to say. It is still a quite new product. A lot of tests have been written, That is not easy to say. It is still a quite new product. A lot of tests have been written,
...@@ -138,11 +148,13 @@ to be dangerous, they are only supported for situations where performance is mor ...@@ -138,11 +148,13 @@ to be dangerous, they are only supported for situations where performance is mor
than reliability. Those dangerous features are: than reliability. Those dangerous features are:
</p> </p>
<ul> <ul>
<li>Disabling the transaction log mechanism using SET LOG 0. <li>Disabling the transaction log mechanism using <code class="notranslate">SET LOG 0</code>.
</li><li>Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while at the same time using multiple </li><li>Using the transaction isolation level <code class="notranslate">READ_UNCOMMITTED</code>
(<code class="notranslate">LOCK_MODE 0</code>) while at the same time using multiple
connections. connections.
</li><li>Disabling database file protection using FILE_LOCK=NO in the database URL. </li><li>Disabling database file protection using <code class="notranslate">FILE_LOCK=NO</code>
</li><li>Disabling referential integrity using SET REFERENTIAL_INTEGRITY FALSE. in the database URL.
</li><li>Disabling referential integrity using <code class="notranslate">SET REFERENTIAL_INTEGRITY FALSE</code>.
</li></ul> </li></ul>
<p> <p>
In addition to that, running out of memory should be avoided. In addition to that, running out of memory should be avoided.
...@@ -153,7 +165,8 @@ Areas that are not fully tested: ...@@ -153,7 +165,8 @@ Areas that are not fully tested:
</p> </p>
<ul> <ul>
<li>Platforms other than Windows XP, Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6 <li>Platforms other than Windows XP, Linux, Mac OS X, or JVMs other than Sun 1.5 or 1.6
</li><li>The features AUTO_SERVER and AUTO_RECONNECT </li><li>The features <code class="notranslate">AUTO_SERVER</code> and
<code class="notranslate">AUTO_RECONNECT</code>
</li><li>The MVCC (multi version concurrency) mode </li><li>The MVCC (multi version concurrency) mode
</li><li>Cluster mode, 2-phase commit, savepoints </li><li>Cluster mode, 2-phase commit, savepoints
</li><li>24/7 operation </li><li>24/7 operation
...@@ -164,12 +177,11 @@ Areas that are not fully tested: ...@@ -164,12 +177,11 @@ Areas that are not fully tested:
</li></ul> </li></ul>
<p> <p>
Areas considered Experimental: Areas considered experimental are:
</p> </p>
<ul> <ul>
<li>The PostgreSQL server <li>The PostgreSQL server
</li><li>The new page store </li><li>Multi-threading within the engine using <code class="notranslate">SET MULTI_THREADED=1</code>
</li><li>Multi-threading within the engine using SET MULTI_THREADED=1
</li><li>Compatibility modes for other databases (only some features are implemented) </li><li>Compatibility modes for other databases (only some features are implemented)
</li></ul> </li></ul>
...@@ -179,10 +191,12 @@ Areas considered Experimental: ...@@ -179,10 +191,12 @@ Areas considered Experimental:
If it takes a long time to open a database, in most cases it was not closed the last time. If it takes a long time to open a database, in most cases it was not closed the last time.
This is specially a problem for larger databases. This is specially a problem for larger databases.
To close a database, close all connections to it before the application ends, or execute To close a database, close all connections to it before the application ends, or execute
the command SHUTDOWN. The database is also closed when the virtual machine exits normally the command <code class="notranslate">SHUTDOWN</code>.
The database is also closed when the virtual machine exits normally
by using a shutdown hook. However killing a Java process or calling Runtime.halt will prevent this. by using a shutdown hook. However killing a Java process or calling Runtime.halt will prevent this.
The reason why opening is slow in this situations is that indexes are re-created. The reason why opening is slow in this situations is that indexes are re-created.
If you can not guarantee the database is closed, consider using SET LOG 2 (see SQL Grammar). If you can not guarantee the database is closed, consider using
<code class="notranslate">SET LOG 2</code> (see SQL Grammar).
</p> </p>
<p> <p>
To find out what the problem is, open the database in embedded mode using the H2 Console. To find out what the problem is, open the database in embedded mode using the H2 Console.
......
...@@ -65,33 +65,53 @@ After installing, you should get the following directory structure: ...@@ -65,33 +65,53 @@ After installing, you should get the following directory structure:
<th>Contents</th> <th>Contents</th>
</tr> </tr>
<tr> <tr>
<td>bin</td> <td class="notranslate">bin</td>
<td>JAR and batch files</td> <td>JAR and batch files</td>
</tr> </tr>
<tr> <tr>
<td>docs</td> <td class="notranslate">docs</td>
<td>Documentation</td> <td>Documentation</td>
</tr> </tr>
<tr> <tr>
<td>docs/html</td> <td class="notranslate">docs/html</td>
<td>HTML pages</td> <td>HTML pages</td>
</tr> </tr>
<tr> <tr>
<td>docs/javadoc</td> <td class="notranslate">docs/javadoc</td>
<td>Javadoc files</td> <td>Javadoc files</td>
</tr> </tr>
<tr> <tr>
<td>ext</td> <td class="notranslate">ext</td>
<td>External dependencies (downloaded when building)</td> <td>External dependencies (downloaded when building)</td>
</tr> </tr>
<tr> <tr>
<td>service</td> <td class="notranslate">service</td>
<td>Tools to run the database as a Windows Service</td> <td>Tools to run the database as a Windows Service</td>
</tr> </tr>
<tr> <tr>
<td>src</td> <td class="notranslate">src</td>
<td>Source files</td> <td>Source files</td>
</tr> </tr>
<tr>
<td class="notranslate">src/docsrc</td>
<td>Documentation sources</td>
</tr>
<tr>
<td class="notranslate">src/installer</td>
<td>Installer, shell, and release build script</td>
</tr>
<tr>
<td class="notranslate">src/main</td>
<td>Database engine source code</td>
</tr>
<tr>
<td class="notranslate">src/test</td>
<td>Test source code</td>
</tr>
<tr>
<td class="notranslate">src/tools</td>
<td>Tools and database adapters source code</td>
</tr>
</table> </table>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
...@@ -57,7 +57,7 @@ Click [Start], [All Programs], [H2], and [H2 Console (Command Line)]:<br /> ...@@ -57,7 +57,7 @@ Click [Start], [All Programs], [H2], and [H2 Console (Command Line)]:<br />
<img class="screenshot" src="images/quickstart-1.png" alt="screenshot: start H2 Console" /><br /> <img class="screenshot" src="images/quickstart-1.png" alt="screenshot: start H2 Console" /><br />
A new console window appears:<br /> A new console window appears:<br />
<img class="screenshot" src="images/quickstart-2.png" alt="screenshot: H2 running" /><br /> <img class="screenshot" src="images/quickstart-2.png" alt="screenshot: H2 running" /><br />
Also, a new browser page should open with the URL <a href="http://localhost:8082">http://localhost:8082</a>. Also, a new browser page should open with the URL <a href="http://localhost:8082" class="notranslate">http://localhost:8082</a>.
You may get a security warning from the firewall. If you don't want other computers in the network to access the database You may get a security warning from the firewall. If you don't want other computers in the network to access the database
on your machine, you can let the firewall block these connections. Only local connections are required at this time. on your machine, you can let the firewall block these connections. Only local connections are required at this time.
</p> </p>
......
...@@ -461,7 +461,13 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -461,7 +461,13 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Fast scrambling (strong encryption doesn't help if the password is included in the application). </li><li>Fast scrambling (strong encryption doesn't help if the password is included in the application).
</li><li>Faster startup if there is a large number of LOB files. </li><li>Faster startup if there is a large number of LOB files.
</li><li>Support using system properties in database URLs (may be a security problem). </li><li>Support using system properties in database URLs (may be a security problem).
</li><li>The index name should be "IDX_" plus the constraint name unless there is a conflict, in which case append a number. </li><li>Issue 126: The index name should be "IDX_" plus the constraint name unless there is a conflict, in which case append a number.
</li><li>Issue 127: Support activation/deactivation of triggers
</li><li>Issue 130: Custom log event listeners
</li><li>Issue 131: IBM DB2 compatibility: sysibm.sysdummy1
</li><li>Issue 132: Use Java enum trigger type.
</li><li>Issue 134: IBM DB2 compatibility: session global variables.
</li><li>FTL_SET_OPTION(keyString, valueString) with key stopWords at first.
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论