提交 632bf2a0 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation & prepare release.

上级 c7c8e5d2
......@@ -1179,7 +1179,7 @@ SET MAX_MEMORY_ROWS 1000
"Commands (Other)","SET MAX_MEMORY_UNDO","
SET MAX_MEMORY_UNDO int
","
The maximum number of undo records per a session that are kept in-memory.
The maximum number of undo records per a session that are kept in-memory.
If a transaction is larger, the records are buffered to disk.
The default value is 50000.
Changes to tables without a primary key can not be buffered to disk.
......
......@@ -770,7 +770,7 @@ The <code>Recover</code> tool creates a SQL script from database file. It also p
Multiple concurrent connections to the same database are supported, however a database file
can only be open for reading and writing (in embedded mode) by one process at the same time.
Otherwise, the processes would overwrite each others data and corrupt the database file.
To protect against this problem, whenever a database is opened, a lock file is created
To protect against this problem, whenever a database is opened, a lock file is created
to signal other processes that the database is in use. If the database is closed, or if the process that opened
the database stops normally, this lock file is deleted.
</p><p>
......
......@@ -18,14 +18,18 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>-
</li></ul>
<h2>Version 1.2.137 (2010-06-06)</h2>
<ul><li>Statements with a nested query and a condition that was always NULL threw an
IndexOutOfBoundsException. Example: select * from (select null as x) where x=1
</li><li>Experimental feature to support very large transactions (except when using MVCC).
To enable, set the system property h2.largeTransactions to true.
If enabled, changes to tables without a primary key can be buffered to disk.
The plan is to enable this feature by default in version 1.3.x.
</li><li>H2 Console: editing result sets is now also working for database other than H2,
if they do support updateable result sets. The query must be prefixed with "@edit".
</li><li>H2 Console: editing result sets is now also working for database other than H2,
if they do support updatable result sets. Add "@edit" before the query.
Only limited testing has been done on this feature,
some data types may not work (please provide feedback if you find issues).
</li><li>Cluster: an open transaction was committed when a cluster node was stopped
......@@ -690,31 +694,5 @@ Change Log
This mechanism is still experimental, and the file format will change, but it is quite stable now.
</li></ul>
<h2>Version 1.1.115 (2009-06-21)</h2>
<ul><li>The new storage mechanism is now alpha quality. To try it out, set the system property
"h2.pageStore" to "true" (java -Dh2.pageStore=true). There are still bugs to be found and fixed,
for example inserting many rows references a lot of main memory. Performance is currently
about the same as with the regular storage mechanism, but the database file size is smaller.
The file format is not stable yet.
</li><li>ALTER TABLE could throw an exception "object already exists" in some cases.
</li><li>Views: in some situations, an ArrayIndexOutOfBoundsException
was thrown when using the same view concurrently.
</li><li>java.util.UUID is now supported in PreparedStatement.setObject and user defined Java functions.
ResultSet.getObject() returns a java.util.UUID when using the UUID data type.
</li><li>H2 Console: the language was reset to the browser language when disconnecting.
</li><li>H2 Console: improved Polish translation.
</li><li>Server-less multi-connection mode: more bugs are fixed.
</li><li>The download page now included the SHA1 checksums.
</li><li>Shell tool: the file encoding workaround is now documented
if you run java org.h2.tools.Shell -?.
</li><li>The RunScript tool and SQL statement did not work with the compression method LZF.
</li><li>Fulltext search: searching for NULL or an empty string threw an exception.
</li><li>Lucene fulltext search: FTL_DROP_ALL did not drop the triggers.
</li><li>Backup: if the database contained CLOB or BLOB data, the backup
included a file entry for the LOB directory. This caused the
restore to fail.
</li><li>Data types: LONG is now an alias for BIGINT.
</li></ul>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......@@ -1070,7 +1070,7 @@ or the SQL statement <code>SET MODE MySQL</code>.
then a 0 (or empty string, or the current timestamp for timestamp columns) value is used.
Usually, this operation is not allowed and an exception is thrown.
</li><li>Creating indexes in the <code>CREATE TABLE</code> statement is allowed using
<code>INDEX(..)</code> or <code>KEY(..)</code>.
<code>INDEX(..)</code> or <code>KEY(..)</code>.
Example: <code>create table test(id int primary key, name varchar(255), key idx_name(name));</code>
</li><li>Meta data calls return identifiers in lower case.
</li><li>When converting a floating point number to an integer, the fractional
......
......@@ -527,7 +527,7 @@ You can rename it to <code>H2Dialect.java</code> and include this as a patch in
or upgrade to a version of Hibernate where this is fixed.
</p>
<p>
When using compatibility modes such as <code>MODE=MySQL</code> when using Hibernate
When using compatibility modes such as <code>MODE=MySQL</code> when using Hibernate
is not supported when using <code>H2Dialect</code>.
</p>
......
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.
......@@ -14,12 +14,12 @@ public class Constants {
/**
* The build id is incremented for each public release.
*/
public static final int BUILD_ID = 136;
public static final int BUILD_ID = 137;
/**
* The build id of the last stable release.
*/
public static final int BUILD_ID_STABLE = 135;
public static final int BUILD_ID_STABLE = 136;
/**
* If H2 is compiled to be included in a product, this should be set to
......@@ -32,12 +32,12 @@ public class Constants {
/**
* The build date is updated for each public release.
*/
public static final String BUILD_DATE = "2010-05-24";
public static final String BUILD_DATE = "2010-06-06";
/**
* The build date is updated for each public release.
*/
public static final String BUILD_DATE_STABLE = "2010-05-08";
public static final String BUILD_DATE_STABLE = "2010-05-24";
/**
* The TCP protocol version number. This protocol is used by the TCP
......@@ -294,7 +294,7 @@ public class Constants {
* The delay that is to be used if throttle has been enabled.
*/
public static final int THROTTLE_DELAY = 50;
/**
* The maximum size of an undo log block.
*/
......
......@@ -52,7 +52,7 @@ public class Mode {
/**
* Creating indexes in the CREATE TABLE statement is allowed using
* <code>INDEX(..)</code> or <code>KEY(..)</code>.
* <code>INDEX(..)</code> or <code>KEY(..)</code>.
* Example: <code>create table test(id int primary key, name varchar(255),
* key idx_name(name));</code>
*/
......
......@@ -206,6 +206,13 @@ public class UndoLog {
}
}
/**
* Get the table id for this undo log. If the table is not registered yet,
* this is done as well.
*
* @param table the table
* @return the id
*/
int getTableId(Table table) {
int id = table.getId();
if (tables == null) {
......@@ -216,7 +223,14 @@ public class UndoLog {
tables.put(id, table);
return id;
}
/**
* Get the table for this id. The table must be registered for this undo log
* first by calling getTableId.
*
* @param id the table id
* @return the table object
*/
Table getTable(int id) {
return tables.get(id);
}
......
......@@ -158,7 +158,7 @@ public class UndoLogRecord {
buff.fillAligned();
buff.setInt(p, (buff.length() - p) / Constants.FILE_BLOCK_SIZE);
}
/**
* Save the row in the file using a buffer.
*
......@@ -174,7 +174,14 @@ public class UndoLogRecord {
row = null;
state = STORED;
}
/**
* Load an undo log record row using a buffer.
*
* @param buff the buffer
* @param log the log
* @return the undo log record
*/
static UndoLogRecord loadFromBuffer(Data buff, UndoLog log) {
UndoLogRecord rec = new UndoLogRecord(null, (short) 0, null);
int pos = buff.length();
......@@ -209,7 +216,7 @@ public class UndoLogRecord {
}
}
}
private void load(Data buff, UndoLog log) {
operation = (short) buff.readInt();
boolean deleted = buff.readByte() == 1;
......
......@@ -187,7 +187,7 @@ public class ViewIndex extends BaseIndex {
ResultInterface result = query.query(0);
return new ViewCursor(table, result);
}
private void setParameter(ArrayList<Parameter> paramList, int x, Value v) {
if (x >= paramList.size()) {
// the parameter may be optimized away as in
......
......@@ -7,6 +7,7 @@
CREATE TABLE VERSION(ID INT PRIMARY KEY, VERSION VARCHAR, CREATED VARCHAR);
INSERT INTO VERSION VALUES
(87, '1.2.137', '2010-06-06'),
(86, '1.2.136', '2010-05-24'),
(85, '1.2.135', '2010-05-08'),
(84, '1.2.134', '2010-04-23'),
......
......@@ -297,15 +297,15 @@ java org.h2.test.TestAll timer
test.printSystem();
System.setProperty("h2.maxMemoryRowsDistinct", "128");
System.setProperty("h2.check2", "true");
int initialTest;
System.setProperty("h2.largeTransactions", "true");
System.setProperty("h2.lobInDatabase", "true");
System.setProperty("h2.analyzeAuto", "100");
// System.setProperty("h2.largeTransactions", "true");
// System.setProperty("h2.lobInDatabase", "true");
// System.setProperty("h2.analyzeAuto", "100");
int speedup;
System.setProperty("h2.syncMethod", "");
// System.setProperty("h2.syncMethod", "");
/*
recovery tests with small freeList pages, page size 64
......
......@@ -24,18 +24,18 @@ public class TestUndoLogMemory {
*/
public static void main(String... args) throws Exception {
System.setProperty("h2.largeTransactions", "true");
int todoLargeRows;
new TestUndoLogMemory().test(10, "null");
new TestUndoLogMemory().test(100, "space(100000)");
// new TestUndoLogMemory().test(100000, "null");
// new TestUndoLogMemory().test(1000, "space(100000)");
}
private void test(int count, String defaultValue) throws SQLException {
// -Xmx1m -XX:+HeapDumpOnOutOfMemoryError
DeleteDbFiles.execute("data", "test", true);
Connection conn = DriverManager.getConnection("jdbc:h2:data/test");
......
......@@ -27,45 +27,45 @@ TableFilter,
join.mapAndAddFilter(on);
}
}
drop table base;
drop table a;
drop table b;
drop table base;
drop table a;
drop table b;
create table a( pk integer, val varchar(255) );
create table b( pk integer, val varchar(255) );
create table base( pk integer, deleted integer );
insert into base values ( 1, 0 );
insert into base values ( 2, 1 );
insert into base values ( 3, 0 );
insert into a values ( 1, 'a' );
insert into b values ( 2, 'a' );
insert into b values ( 3, 'a' );
select a.pk, a_base.pk, b.pk, b_base.pk from a inner join base a_base
insert into base values ( 1, 0 );
insert into base values ( 2, 1 );
insert into base values ( 3, 0 );
insert into a values ( 1, 'a' );
insert into b values ( 2, 'a' );
insert into b values ( 3, 'a' );
select a.pk, a_base.pk, b.pk, b_base.pk from a inner join base a_base
on a.pk = a_base.pk left outer join
( b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 ) ;
-- H2:
-- 1 1 2 null
-- 1 1 3 3
-- PostgreSQL: ERROR: syntax error at end of input 42601/0
-- MySQL: You have an error in your SQL syntax;
-- check the manual that corresponds to your MySQL server version
-- MySQL: You have an error in your SQL syntax;
-- check the manual that corresponds to your MySQL server version
-- for the right syntax to use near '' at line 3
-- Derby: Syntax error: Encountered "<EOF>" at line 3, column 71. 42X01/30000
-- HSQLDB: Unexpected token B, requires SELECT in statement
select a.pk, a_base.pk, b.pk, b_base.pk from a inner join base a_base
select a.pk, a_base.pk, b.pk, b_base.pk from a inner join base a_base
on a.pk = a_base.pk left outer join
( b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 )
( b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 )
on a.pk = b.pk;
-- H2, MySQL, PostgreSQL, Derby:
-- 1 1 null null
-- HSQLDB: Unexpected token B, requires SELECT in statement
select a.pk, a_base.pk, b.pk, b_base.pk from a inner join base a_base
select a.pk, a_base.pk, b.pk, b_base.pk from a inner join base a_base
on a.pk = a_base.pk left outer join
( b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 )
( b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 )
on 1=1;
-- H2:
-- 1 1 2 null
......@@ -74,9 +74,9 @@ on 1=1;
-- 1 1 3 3
-- HSQLDB: Unexpected token B, requires SELECT in statement
select a.pk, a_base.pk, bpk, bbasepk from a inner join base a_base
select a.pk, a_base.pk, b_pk, b_base_pk from a inner join base a_base
on a.pk = a_base.pk left outer join
( select b.pk bpk, b_base.pk bbasepk from b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 ) x
( select b.pk b_pk, b_base.pk b_base_pk from b inner join base b_base on b.pk = b_base.pk and b_base.deleted = 0 ) x
on 1=1;
-- PostgreSQL, MySQL, Derby, H2:
-- 1 1 3 3
......@@ -87,7 +87,7 @@ create table test(id int primary key);
@loop 3 insert into test values(?);
select * from test a left outer join (test b inner join test c on b.id = c.id - 2) on a.id = b.id + 1;
select * from test a left outer join (select b.id, c.id from test b inner join test c on b.id = c.id - 2) on a.id = b.id + 1;
Auto Upgrade
-----------------
......
......@@ -645,4 +645,5 @@ determine timestampdiff harmony doap shortdesc wireless iceland sigurdsson
darri chunks bjorn chunked watson regardless usefulinc represented pushd
recorder grajciar recording slovensky uninitialized arriving lubomir unchanged
erik dick calculations lutin cite bom evaluating telegard excel bbs deprecation
importing cumulative fired convenient sums judged anybody vacuum
importing cumulative fired convenient sums judged anybody vacuum encountered
corresponds
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论