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

Documentation.

上级 c679ee07
......@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>The DeleteDbFiles tool deleted all files in the .lob.db directory,
<ul><li>There are known errors on rollback when the page store is disabled and at the same time
MVCC is used. See http://code.google.com/p/h2database/issues/detail?id=158
</li><li>The DeleteDbFiles tool deleted all files in the .lob.db directory,
even files that didn't belong to the database.
</li><li>Automatic conversion of old databases to the page store format failed
if the database contained LOB files.
......
......@@ -71,6 +71,9 @@ Here is the list of known and confirmed issues:
next to the <code>h2*.jar</code> file.
This problem is solved in Install4j 4.1.4.
</li></ul>
<p>
For a complete list, see <a href="http://code.google.com/p/h2database/issues/list">Open Issues</a>.
</p>
<h3 id="open_source">Is this Database Engine Open Source?</h3>
<p>
......
......@@ -482,7 +482,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
<ul>
<li>HSQLDB (did) support this: select id i from test where i&lt;0 (other databases don't). Supporting it may break compatibility.
</li><li>String.intern (so that Strings can be compared with ==) will not be used because some VMs have problems when used extensively.
</li><li>In prepared statements, identifier names (table names and so on) can not be parameterized. Adding such a feature would complicate the souce code without providing reasonable speedup, and would slow down regular prepared statements.
</li><li>In prepared statements, identifier names (table names and so on) can not be parameterized. Adding such a feature would complicate the source code without providing reasonable speedup, and would slow down regular prepared statements.
</li></ul>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1450,6 +1450,7 @@ public class Database implements DataHandler {
/**
* Get all tables and views.
*
* @param includeMeta whether to include the meta data tables
* @return all objects of that type
*/
public ObjectArray<Table> getAllTablesAndViews(boolean includeMeta) {
......
......@@ -1161,7 +1161,7 @@ public class Session extends SessionWithState {
if (undoLog.size() == 0 || !database.isPersistent()) {
return ValueNull.INSTANCE;
}
return ValueString.get(firstUncommittedLog+"-" + firstUncommittedPos + "-" + id);
return ValueString.get(firstUncommittedLog + "-" + firstUncommittedPos + "-" + id);
}
/**
......
......@@ -301,6 +301,8 @@ java org.h2.test.TestAll timer
documentation and resources: utf-8
document FETCH FIRST
power failure test: larger binaries and additional indexes
(with many columns).
......
......@@ -34,8 +34,9 @@ public class TestTransaction extends TestBase {
}
public void test() throws SQLException {
testForUpdate();
testRollback();
testRollback2();
testForUpdate();
testSetTransaction();
testReferential();
testSavepoint();
......@@ -68,6 +69,60 @@ public class TestTransaction extends TestBase {
}
private void testRollback() throws SQLException {
if (!config.pageStore) {
// known not to work when the page store is disabled
return;
}
deleteDb("transaction");
Connection conn = getConnection("transaction");
Statement stat = conn.createStatement();
stat.execute("create table test(id int)");
stat.execute("create index idx_id on test(id)");
stat.execute("insert into test values(1), (1), (1)");
if (!config.memory) {
conn.close();
conn = getConnection("transaction");
stat = conn.createStatement();
}
conn.setAutoCommit(false);
stat.execute("delete from test");
conn.rollback();
ResultSet rs;
rs = stat.executeQuery("select * from test");
assertResultRowCount(3, rs);
rs = stat.executeQuery("select * from test where id = 1");
assertResultRowCount(3, rs);
conn.close();
conn = getConnection("transaction");
stat = conn.createStatement();
stat.execute("create table master(id int) as select 1");
stat.execute("create table child1(id int references master(id) on delete cascade)");
stat.execute("insert into child1 values(1), (1), (1)");
stat.execute("create table child2(id int references master(id)) as select 1");
if (!config.memory) {
conn.close();
conn = getConnection("transaction");
stat = conn.createStatement();
}
stat = conn.createStatement();
try {
stat.execute("delete from master");
fail();
} catch (SQLException ex) {
// ok
conn.rollback();
}
rs = stat.executeQuery("select * from master where id=1");
assertResultRowCount(1, rs);
rs = stat.executeQuery("select * from child1");
assertResultRowCount(3, rs);
rs = stat.executeQuery("select * from child1 where id=1");
assertResultRowCount(3, rs);
conn.close();
}
private void testRollback2() throws SQLException {
deleteDb("transaction");
Connection conn = getConnection("transaction");
Statement stat = conn.createStatement();
......
......@@ -629,4 +629,4 @@ sweden abbreviated xmx trede googlecode gustav standing hashes
decompressed expansion ziv abbreviated augments omitted gain
subtracted maxed logical lempel increases sibling impersonate proper remembers
moon centric adeptia workflows generalized bpchar binaries incremental poor
slowly prefs precedence mat verbose nonce
slowly prefs precedence mat verbose nonce complicate speedup replay
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论