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

Documentation.

上级 7f048fc0
...@@ -545,6 +545,7 @@ rows are lost when the database is closed. ...@@ -545,6 +545,7 @@ rows are lost when the database is closed.
Temporary tables are not persistent. Temporary tables can be global (accessible by all connections) Temporary tables are not persistent. Temporary tables can be global (accessible by all connections)
or local (only accessible by the current connection). The default is for temporary tables is global. or local (only accessible by the current connection). The default is for temporary tables is global.
Indexes of temporary tables are kept fully in main memory.
This command commits an open transaction. This command commits an open transaction.
"," ","
......
...@@ -18,7 +18,18 @@ Change Log ...@@ -18,7 +18,18 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li> <ul><li>UNIQUE was not listed as a keyword.
</li><li>Improved error message when an non-SQL-exception occurred in a user
defined function. The method name and parameters are included in the error message.
</li><li>For some queries, the exception did not include the SQL statement. Example:
select x from system_range(1, 2) group by 'a'.
</li><li>The Shell tool will execute SQL statements passed as using the command line
parameter -sql.
</li><li>If InetAddress.getLocalHost() fails, the database should now throw an exception.
</li><li>New columns INFORMATION_SCHEMA.INDEXES.INDEX_CLASS and
INFORMATION_SCHEMA.TABLES.TABLE_CLASS.
</li><li>INFORMATION_SCHEMA.INDEXES.SQL now contains the CREATE INDEX statement
instead of just the fully qualified index name.
</li></ul> </li></ul>
<h2>Version 1.2.134 (2010-04-23)</h2> <h2>Version 1.2.134 (2010-04-23)</h2>
......
...@@ -56,7 +56,9 @@ Please read the <a href="build.html#support">support checklist</a>. ...@@ -56,7 +56,9 @@ Please read the <a href="build.html#support">support checklist</a>.
Usually, bugs get fixes as they are found. There is a release every few weeks. 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 <code>null</code> when <ul><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>.
</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 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 1.1.107 and older, and may still not work in newer versions. Please report it if you
run into this issue. In Tomcat &gt;= 6.0 this behavior can be disabled by setting the run into this issue. In Tomcat &gt;= 6.0 this behavior can be disabled by setting the
......
...@@ -483,6 +483,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -483,6 +483,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Support a data type "timestamp with timezone" using java.util.Calendar. </li><li>Support a data type "timestamp with timezone" using java.util.Calendar.
</li><li>Maybe use a different page layout: keep the data at the head of the page, and ignore the tail </li><li>Maybe use a different page layout: keep the data at the head of the page, and ignore the tail
(don't store / read it). This may increase write / read performance depending on the file system. (don't store / read it). This may increase write / read performance depending on the file system.
</li><li>Indexes of temporary tables are currently kept in-memory. Is this how it should be?
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
...@@ -516,11 +516,12 @@ Shutting down a TCP server can be protected using the option <code>-tcpPassword< ...@@ -516,11 +516,12 @@ Shutting down a TCP server can be protected using the option <code>-tcpPassword<
<h2 id="using_hibernate">Using Hibernate</h2> <h2 id="using_hibernate">Using Hibernate</h2>
<p> <p>
This database supports Hibernate version 3.1 and newer. You can use the HSQLDB Dialect, This database supports Hibernate version 3.1 and newer. You can use the HSQLDB Dialect,
or the native H2 Dialect. Unfortunately the H2 Dialect included in Hibernate is buggy. A or the native H2 Dialect. Unfortunately the H2 Dialect included in some versions of Hibernate is buggy.
<a href="http://opensource.atlassian.com/projects/hibernate/browse/HHH-3401">patch A <a href="http://opensource.atlassian.com/projects/hibernate/browse/HHH-3401">patch
for Hibernate</a> has been submitted. The dialect for the newest version of Hibernate for Hibernate</a> has been submitted and is now applied. The dialect for the newest version of Hibernate
is also available at <code>src/tools/org/hibernate/dialect/H2Dialect.java.txt</code>. is also available at <code>src/tools/org/hibernate/dialect/H2Dialect.java.txt</code>.
You can rename it to <code>H2Dialect.java</code> and include this as a patch in your application. You can rename it to <code>H2Dialect.java</code> and include this as a patch in your application,
or upgrade to a version of Hibernate where this is fixed.
</p> </p>
<h2 id="using_toplink">Using TopLink and Glassfish</h2> <h2 id="using_toplink">Using TopLink and Glassfish</h2>
......
...@@ -155,6 +155,9 @@ public class Data { ...@@ -155,6 +155,9 @@ public class Data {
/** /**
* Calculate the length of String, excluding the bytes required to encode * Calculate the length of String, excluding the bytes required to encode
* the length. * the length.
* <p>
* For performance reasons the internal representation of a String is
* similar to UTF-8, but not exactly UTF-8.
* *
* @param s the string * @param s the string
* @param len the length of the string * @param len the length of the string
...@@ -184,6 +187,15 @@ public class Data { ...@@ -184,6 +187,15 @@ public class Data {
return readString(len); return readString(len);
} }
/**
* Read a String from the byte array.
* <p>
* For performance reasons the internal representation of a String is
* similar to UTF-8, but not exactly UTF-8.
*
* @param len
* @return the String
*/
private String readString(int len) { private String readString(int len) {
byte[] buff = data; byte[] buff = data;
int p = pos; int p = pos;
...@@ -203,7 +215,7 @@ public class Data { ...@@ -203,7 +215,7 @@ public class Data {
} }
/** /**
* Write a String value. * Write a String.
* The current position is incremented. * The current position is incremented.
* *
* @param s the value * @param s the value
...@@ -214,6 +226,15 @@ public class Data { ...@@ -214,6 +226,15 @@ public class Data {
writeStringWithoutLength(s, len); writeStringWithoutLength(s, len);
} }
/**
* Write a String.
* <p>
* For performance reasons the internal representation of a String is
* similar to UTF-8, but not exactly UTF-8.
*
* @param s the string
* @param len the number of characters to write
*/
private void writeStringWithoutLength(String s, int len) { private void writeStringWithoutLength(String s, int len) {
int p = pos; int p = pos;
byte[] buff = data; byte[] buff = data;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论