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

--no commit message

--no commit message
上级 f68122a5
......@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>-
<ul><li>Column names could not be named "UNIQUE" (with the quotes).
</li><li>New system function TRANSACTION_ID() to get the current transaction
identifier for a session.
</li></ul>
<h2>Version 1.1.108 (2009-02-28)</h2>
......
......@@ -435,11 +435,12 @@ or on the number of open connections.
<h3>Mixed Mode</h3>
<p>
The mixed mode is a combination of the embedded and the remote mode.
The main application connects to a database in embedded mode, but also starts
a server so that other applications (running in different virtual machines) can
The first application that connects to a database does that in embedded mode, but also starts
a server so that other applications (running in different processes or virtual machines) can
concurrently access the same data. The embedded connections are as fast as if
the database is used in just the embedded mode, while the remote
connections are a bit slower.
connections are a bit slower. All clients that want to connect to the database (no matter if
it's an embedded or remote connection) can do so using the exact same database URL.
</p>
<img src="images/connection-mode-mixed.png"
alt="The database and the server is running inside the application; another application connects remotely" />
......
......@@ -39,6 +39,12 @@ H2Sharp: ADO.NET interface for the H2 database engine</a>
H2 Spatial: spatial functions to H2 database</a>
<h2>Blogs</h2>
<a href="http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database/">
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">
......
......@@ -328,7 +328,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Javadocs: for each tool, add a copy &amp; paste sample in the class level.
</li><li>Javadocs: add @author tags.
</li><li>Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start();
</li><li>MySQL compatibility: real SQL statements for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
</li><li>MySQL compatibility: real SQL statement for DESCRIBE TEST
</li><li>Use a default delay of 1 second before closing a database.
</li><li>Maven: upload source code and javadocs as well.
</li><li>Write (log) to system table before adding to internal data structures.
......@@ -406,6 +406,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>Support PostgreSQL lock modes: http://www.postgresql.org/docs/8.3/static/explicit-locking.html
</li><li>PostgreSQL compatibility: test DbVisualizer and Squirrel SQL using a new PostgreSQL JDBC driver.
</li><li>RunScript should be able to read from system in (or quite mode for Shell).
</li><li>Natural join: support select x from dual natural join dual.
</li></ul>
<h2>Not Planned</h2>
......
......@@ -432,12 +432,16 @@ add the following snippet to your web.xml file (after context-param and before f
&lt;/listener>
</pre>
<p>
For details on how to access the database, see the code DbStarter.java
For details on how to access the database, see the file DbStarter.java.
By default the DbStarter listener opens an embedded connection using the database URL jdbc:h2:~/test
and user name and password 'sa'. If you want to use it within your servlet, you can access it like this:
</p>
<pre>
Connection conn = getServletContext().getAttribute("connection");
</pre>
<p>
By default the DbStarter listener opens an embedded connection using the database URL jdbc:h2:~/test
and user name and password 'sa'. It can also start the TCP server, however this is disabled by default.
To enable it, use the db.tcpServer parameter in web.xml. Here is the complete list of options.
The DbStarter can also start the TCP server, however this is disabled by default.
To enable it, use the parameter db.tcpServer in the file web.xml. Here is the complete list of options.
These options are set just after the display-name and description tag, but before any listener and filter tags:
</p>
<pre>
......
......@@ -40,6 +40,7 @@ import org.h2.value.Value;
import org.h2.value.ValueLob;
import org.h2.value.ValueLong;
import org.h2.value.ValueNull;
import org.h2.value.ValueString;
/**
* A session represents an embedded database connection. When using the server
......@@ -1127,4 +1128,11 @@ public class Session extends SessionWithState {
connectionInfo = ci;
}
public Value getTransactionId() {
if (undoLog.size() == 0 || !database.isPersistent()) {
return ValueNull.INSTANCE;
}
return ValueString.get(firstUncommittedLog+"-" + firstUncommittedPos + "-" + id);
}
}
......@@ -1496,14 +1496,14 @@ public class JdbcConnection extends TraceObject implements Connection {
## Java 1.6 end ##*/
/**
* Create a clob value from this reader.
* Create a Clob value from this reader.
*
* @param x the reader
* @param length the length (if smaller or equal to 0, all data until the
* @param length the length (if smaller or equal than 0, all data until the
* end of file is read)
* @return the value
*/
Value createClob(Reader x, long length) throws SQLException {
public Value createClob(Reader x, long length) throws SQLException {
if (x == null) {
return ValueNull.INSTANCE;
}
......@@ -1515,14 +1515,14 @@ public class JdbcConnection extends TraceObject implements Connection {
}
/**
* Create a blob value from this input stream.
* Create a Blob value from this input stream.
*
* @param x the input stream
* @param length the length (if smaller or equal to 0, all data until the
* @param length the length (if smaller or equal than 0, all data until the
* end of file is read)
* @return the value
*/
Value createBlob(InputStream x, long length) throws SQLException {
public Value createBlob(InputStream x, long length) throws SQLException {
if (x == null) {
return ValueNull.INSTANCE;
}
......
......@@ -127,6 +127,15 @@ The password must be in single quotes. It is case sensitive and can contain spac
SCRIPT NODATA
"
"Commands (DML)","SHOW","
SHOW { SCHEMAS | TABLES [FROM schemaName] |
COLUMNS FROM tableName [FROM schemaName] }
","
Lists the schemas, tables, or the columns of a table.
","
SHOW TABLES
"
"Commands (DDL)","ALTER INDEX RENAME","
ALTER INDEX indexName RENAME TO newIndexName
","
......@@ -3073,6 +3082,17 @@ Returns the result set. TABLE_DISTINCT removes duplicate rows.
SELECT * FROM TABLE(ID INT=(1, 2), NAME VARCHAR=('Hello', 'World'))
"
"Functions (System)","TRANSACTION_ID","
TRANSACTION_ID(): string
","
Returns the current transaction id for this session. This method returns NULL
if there is no uncommitted change, or if the the database is not persisted.
Otherwise a value of the following form is returned: logFileId-position-sessionId.
The value is unique across database restarts (values are not re-used).
","
CALL TRANSACTION_ID()
"
"Functions (System)","USER","
{USER | CURRENT_USER}(): string
","
......
......@@ -283,19 +283,11 @@ java org.h2.test.TestAll timer
/*
select 1 from dual a where 1 in(select 1 from dual b
where 1 in(select 1 from dual c where a.x=1));
mark 1.1 as stable
http://www.marciowb.net/blog/2008/08/quickly-using-h2-database-with
http://blogs.sun.com/theaquarium/entry/h2_database_with_glassfish
http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database/
documentation: start rolling review; consistently use <code> or not.
test performance with log=2
maybe make log=2 the default option
TRANSACTION_ID()
use 127.0.0.1 if other addresses don't work
......@@ -303,7 +295,10 @@ select for update in mvcc mode: only lock the selected records?
JCR: for each node type, create a table; one 'dynamic' table with parameter;
option to cache the results
Favicon per page
<link rel="icon" type="image/png" href="/path/image.png">
create a short 4 pages documentation
postgresql generate_series?
......
......@@ -150,7 +150,7 @@ public class CheckTextFiles {
for (int i = 0; i < data.length; i++) {
char ch = (char) (data[i] & 0xff);
if (ch > 127) {
fail(file, "contains character " + ch, line);
fail(file, "contains character " + (int) ch + " at " + new String(data, i - 10, 20), line);
return;
} else if (ch < 32) {
if (ch == '\n') {
......
......@@ -582,4 +582,4 @@ bot jot delicious rife appenders circles spelling cash sky ecm nuxeo poland
opengeospatial sfs symmetric obsolete failing parenthesis unloading refreshed
grails reloading slightly accepting deploying conflicting recovered counters
versus extracts squirrel misdirected rle looking arc addressed european
soerensen
soerensen favicon glass restarts flexive fish
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论