提交 7bbf1613 authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 b1dbfd4e
...@@ -18,11 +18,15 @@ Change Log ...@@ -18,11 +18,15 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>-
</li></ul>
<h2>Version 1.2.131 (2010-03-05)</h2>
<ul><li>Older versions of H2 (version 1.2.127 and older) could not connect to a new version (version 1.2.129 and newer). <ul><li>Older versions of H2 (version 1.2.127 and older) could not connect to a new version (version 1.2.129 and newer).
The connection blocked when trying to connect. Now the connection no longer blocks, instead a SQL exception is thrown. The connection blocked when trying to connect. Now the connection no longer blocks, instead a SQL exception is thrown.
</li><li>In versions 1.2.129 and 1.2.130, a database could not be opened sometimes </li><li>In versions 1.2.129 and 1.2.130, a database could not be opened sometimes
after dropping tables or indexes, and then creating new indexes for existing tables. after dropping tables or indexes, and then creating new indexes for existing tables.
The exception contained the text "parent not found" (version 1.2.129) or The exception contained the text "parent not found" (version 1.2.129) or
"Table not found" (version 1.2.130). "Table not found" (version 1.2.130).
</li><li>After the database was closed, a null pointer exception could occur in Database.flush. </li><li>After the database was closed, a null pointer exception could occur in Database.flush.
</li><li>An IndexOutOfBoundsException could occur in the page store (eg. on "delete from table"). Fixed. </li><li>An IndexOutOfBoundsException could occur in the page store (eg. on "delete from table"). Fixed.
...@@ -583,47 +587,5 @@ Change Log ...@@ -583,47 +587,5 @@ Change Log
a message if data was truncated. a message if data was truncated.
</li></ul> </li></ul>
<h2>Version 1.1.110 (2009-04-03)</h2>
<ul><li>Support for not persistent in-memory tables in regular (persistent) databases
using CREATE MEMORY TABLE(..) NOT PERSISTENT. Thanks a lot to Sergi Vladykin for the patch!
</li><li>The H2 Console trimmed the password (removed leading and trailing spaces).
This is no longer the case, to support encrypted H2 database with an empty user password.
</li><li>The data type of a SUBSTRING method was wrong.
</li><li>ResultSet.findColumn and get methods with column label parameters
now also check for matching column names (like most databases except MySQL).
</li><li>H2 Console: the browser system property now supports a list of arguments.
Example: java -Dh2.browser="open,-a,Safari,%url" ...
</li><li>Improved Javadoc navigation (similar to Scaladoc).
</li><li>H2 Console: auto-complete of identifiers did not work correctly
for H2 databases in MySQL mode.
</li><li>DISTINCT and GROUP BY on a CLOB column was broken.
</li><li>The FTP server moved to the tools section and is no longer included in the h2*.jar file.
</li><li>Improved error message for unsupported features:
now the message says what exactly is not supported.
</li><li>Improved OSGi support.
</li><li>Some internal caches did not use the LRU mechanism. Fixed
(LOB file list, optimizer cost cache, trace system, view indexes, collection keys,
compressed in-memory file system).
</li><li>The API of the tools changed a bit (each tool now returns an exit code).
</li><li>Command line help of the tools now match the javadocs.
The build converts the javadocs to a resource that is read by the tool at runtime.
This should not have an effect on using the database, but it reduces duplicate
and out-of-sync documentation.
</li><li>CREATE TABLE: improved compatibility (support for UNIQUE NOT NULL).
</li><li>DatabaseMetaData.getSQLKeywords now returns the correct list.
</li><li>Deterministic user defined functions did not work when the parameter was a column. Fixed.
</li><li>JdbcConnectionPool.setLoginTimeout with 0 now uses the default timeout.
</li><li>Creating a JdbcConnectionPool has been simplified a bit.
</li><li>The built-in connection pool did not re-use connections.
Getting a connection using the built-in JdbcConnectionPool is now about 70 times faster
than opening connections using DriverManager.getConnection.
</li><li>More bugs in the server-less multi-connection mode have been fixed:
If a process terminated while writing, other open connections were blocked.
If two processes were writing to the database, sometimes the database was corrupt after closing.
</li><li>Linked tables to SQLite database can now be created.
</li><li>Nested IN(IN(...)) didn't work.
</li><li>NIO storage: the nio: prefix was using memory mapped files instead of FileChannel.
</li></ul>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
...@@ -474,8 +474,8 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -474,8 +474,8 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Tree index: Instead of an AVL tree, use a general balanced trees or a scapegoat tree. </li><li>Tree index: Instead of an AVL tree, use a general balanced trees or a scapegoat tree.
</li><li>User defined functions: allow to store the bytecode (of just the class, or the jar file of the extension) in the database. </li><li>User defined functions: allow to store the bytecode (of just the class, or the jar file of the extension) in the database.
</li><li>Compatibility: ResultSet.getObject() on a CLOB (TEXT) should return String for PostgreSQL and MySQL. </li><li>Compatibility: ResultSet.getObject() on a CLOB (TEXT) should return String for PostgreSQL and MySQL.
</li><li>Optimizer: WHERE X=? AND Y IN(?), it always picks the index on Y. Should be cost based. </li><li>Optimizer: WHERE X=? AND Y IN(?), it always uses the index on Y. Should be cost based.
</li><li>Support ALTER SCHEMA name RENAME TO newname (rename schema). </li><li>Support ALTER SCHEMA name RENAME TO newName (rename schema).
</li><li>Make the cache scan resistant (currently a small cache is faster than a large cache for large table scans). </li><li>Make the cache scan resistant (currently a small cache is faster than a large cache for large table scans).
</li></ul> </li></ul>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -14,7 +14,7 @@ public class Constants { ...@@ -14,7 +14,7 @@ public class Constants {
/** /**
* The build id is incremented for each public release. * The build id is incremented for each public release.
*/ */
public static final int BUILD_ID = 130; public static final int BUILD_ID = 131;
/** /**
* The build id of the last stable release. * The build id of the last stable release.
...@@ -32,7 +32,7 @@ public class Constants { ...@@ -32,7 +32,7 @@ public class Constants {
/** /**
* The build date is updated for each public release. * The build date is updated for each public release.
*/ */
public static final String BUILD_DATE = "2010-02-26"; public static final String BUILD_DATE = "2010-03-05";
/** /**
* The build date is updated for each public release. * The build date is updated for each public release.
......
...@@ -1480,7 +1480,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1480,7 +1480,7 @@ public class JdbcConnection extends TraceObject implements Connection {
int id = getNextId(TraceObject.CLOB); int id = getNextId(TraceObject.CLOB);
debugCodeAssign("NClob", TraceObject.CLOB, id, "createNClob()"); debugCodeAssign("NClob", TraceObject.CLOB, id, "createNClob()");
checkClosedForWrite(); checkClosedForWrite();
ValueLob v = ValueLob.createSmallLob(Value.CLOB, Utils.EMPTY_BYTES); Value v = LobStorage.createSmallLob(Value.CLOB, Utils.EMPTY_BYTES);
return new JdbcClob(this, v, id); return new JdbcClob(this, v, id);
} catch (Exception e) { } catch (Exception e) {
throw logAndConvert(e); throw logAndConvert(e);
......
...@@ -21,12 +21,14 @@ import org.h2.store.FileStore; ...@@ -21,12 +21,14 @@ import org.h2.store.FileStore;
import org.h2.store.FileStoreInputStream; import org.h2.store.FileStoreInputStream;
import org.h2.store.FileStoreOutputStream; import org.h2.store.FileStoreOutputStream;
import org.h2.store.fs.FileSystem; import org.h2.store.fs.FileSystem;
import org.h2.store.fs.FileSystemMemory;
import org.h2.util.IOUtils; import org.h2.util.IOUtils;
import org.h2.util.MathUtils; import org.h2.util.MathUtils;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
import org.h2.util.Utils; import org.h2.util.Utils;
/**
* An alternate LOB implementation.
*/
public class ValueLob2 extends Value { public class ValueLob2 extends Value {
/** /**
...@@ -376,7 +378,6 @@ public class ValueLob2 extends Value { ...@@ -376,7 +378,6 @@ public class ValueLob2 extends Value {
} }
private int getNewObjectId(DataHandler h) { private int getNewObjectId(DataHandler h) {
// TODO Auto-generated method stub
return 0; return 0;
} }
......
...@@ -13,6 +13,19 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' , ...@@ -13,6 +13,19 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR); CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
INSERT INTO ITEM VALUES(81,
'New version available: 1.2.131 (2010-03-05)', '2010-03-05 12:00:00',
$$A new version of H2 is available for
<a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
For details, see the
<a href="http://www.h2database.com/html/changelog.html">change log</a>.
<br />
For future plans, see the
<a href="http://www.h2database.com/html/roadmap.html">roadmap</a>.
$$);
INSERT INTO ITEM VALUES(80, INSERT INTO ITEM VALUES(80,
'New version available: 1.2.130 (2010-02-26)', '2010-02-26 12:00:00', 'New version available: 1.2.130 (2010-02-26)', '2010-02-26 12:00:00',
$$A new version of H2 is available for $$A new version of H2 is available for
...@@ -220,40 +233,6 @@ For future plans, see the 'Roadmap' page at ...@@ -220,40 +233,6 @@ For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html http://www.h2database.com/html/roadmap.html
$$); $$);
INSERT INTO ITEM VALUES(68,
'New version available: 1.1.118 (2009-09-04)', '2009-09-04 12:00:00',
$$A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
<b>Changes and new functionality:</b>
<ul><li>Better optimizations for OR, IN(..), and IN(SELECT..) are available.
</li><li>Better support GaeVFS (Google App Engine Virtual File System).
</li><li>JaQu: the plan is to support pure Java / Scala conditions using de-compilation.
</li><li>Various tools now use Java 5 var-args.
</li><li>H2 Console: indexes in non-default schemas are now listed.
</li><li>H2 Console: PierPaolo Ucchino has completed the Italian translation. Thanks a lot!
</li><li>The stack trace of common exceptions is no longer logged.
</li></ul>
<b>Bugfixes:</b>
<ul><li>SHOW COLUMNS only listed indexed columns.
</li><li>When calling SHUTDOWN IMMEDIATELY, a file was not closed.
</li><li>DatabaseMetaData.getPrimaryKeys: the wrong constraint name was reported.
</li><li>AUTO_INCREMENT now does not create a primary key for ALTER TABLE.
</li><li>Native fulltext search: FT_INIT() now only needs to be called once.
</li><li>Various bugfixes and improvements in the page store mechanism.
</li><li>PreparedStatement.setObject now supports java.lang.Character.
</li><li>MVCC / duplicate primary key after rollback.
</li><li>MVCC / wrong exception is thrown.
</li><li>Sequence.NEXTVAL and CURRVAL did not respect the schema search path.
</li><li>The exception "Row not found when trying to delete" was thrown sometimes.
</li></ul>
For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html
<br />
For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html
$$);
SELECT 'newsfeed-rss.xml' FILE, SELECT 'newsfeed-rss.xml' FILE,
XMLSTARTDOC() || XMLSTARTDOC() ||
XMLNODE('rss', XMLATTR('version', '2.0'), XMLNODE('rss', XMLATTR('version', '2.0'),
......
...@@ -76,7 +76,7 @@ public class TestCases extends TestBase { ...@@ -76,7 +76,7 @@ public class TestCases extends TestBase {
testCollation(); testCollation();
deleteDb("cases"); deleteDb("cases");
} }
private void testDeleteIndexOutOfBounds() throws SQLException { private void testDeleteIndexOutOfBounds() throws SQLException {
deleteDb("cases"); deleteDb("cases");
Connection conn = getConnection("cases"); Connection conn = getConnection("cases");
...@@ -85,7 +85,7 @@ public class TestCases extends TestBase { ...@@ -85,7 +85,7 @@ public class TestCases extends TestBase {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
for (int i = 0; i < 3000; i++) { for (int i = 0; i < 3000; i++) {
builder.append("abc"); builder.append("abc");
stat.execute("insert into test (txt) values ('" + builder.toString() + "');"); stat.execute("insert into test (txt) values ('" + builder.toString() + "');");
} }
stat.execute("DELETE FROM test;"); stat.execute("DELETE FROM test;");
conn.close(); conn.close();
......
...@@ -246,11 +246,18 @@ public class TestRecover { ...@@ -246,11 +246,18 @@ public class TestRecover {
// if (random.nextBoolean()) { // if (random.nextBoolean()) {
// int test; // int test;
// if (random.nextBoolean()) { // if (random.nextBoolean()) {
// conn.createStatement().execute("drop index if exists idx_2"); // conn.createStatement().execute(
// conn.createStatement().execute("create table if not exists test2(id int primary key) as select x from system_range(1, 1000)"); // "drop index if exists idx_2");
// conn.createStatement().execute(
// "create table if not exists test2" +
// "(id int primary key) as select x " +
// "from system_range(1, 1000)");
// } else { // } else {
// conn.createStatement().execute("create index if not exists idx_2 on test(d, name, id)"); // conn.createStatement().execute(
// conn.createStatement().execute("drop table if exists test2"); // "create index if not exists idx_2 " +
// "on test(d, name, id)");
// conn.createStatement().execute(
// "drop table if exists test2");
// } // }
// } // }
if (random.nextBoolean()) { if (random.nextBoolean()) {
......
...@@ -13,7 +13,8 @@ import org.h2.test.TestBase; ...@@ -13,7 +13,8 @@ import org.h2.test.TestBase;
import org.h2.test.synth.OutputCatcher; import org.h2.test.synth.OutputCatcher;
/** /**
* Run the TestRecover test case in a loop. The process is killed after 10 seconds. * Run the TestRecover test case in a loop. The process is killed after 10
* seconds.
*/ */
public class TestRecoverKillLoop extends TestBase { public class TestRecoverKillLoop extends TestBase {
......
...@@ -222,9 +222,9 @@ public class TestLob { ...@@ -222,9 +222,9 @@ public class TestLob {
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
// random.nextBytes(buff); // random.nextBytes(buff);
if (regular) { if (regular) {
// prep.setInt(1, x++); prep.setInt(1, x++);
// prep.setBinaryStream(2, new ByteArrayInputStream(buff), len); prep.setBinaryStream(2, new ByteArrayInputStream(buff), len);
// prep.execute(); prep.execute();
} else { } else {
LobId id = addLob(new ByteArrayInputStream(buff), -1, -1); LobId id = addLob(new ByteArrayInputStream(buff), -1, -1);
list.add(id); list.add(id);
...@@ -289,6 +289,12 @@ public class TestLob { ...@@ -289,6 +289,12 @@ public class TestLob {
nextLob = rs.getLong(1) + 1; nextLob = rs.getLong(1) + 1;
} }
/**
* Create a prepared statement, or re-use an existing one.
*
* @param sql the SQL statement
* @return the prepared statement
*/
protected synchronized PreparedStatement prepare(String sql) throws SQLException { protected synchronized PreparedStatement prepare(String sql) throws SQLException {
PreparedStatement prep = prepared.get(sql); PreparedStatement prep = prepared.get(sql);
if (prep == null) { if (prep == null) {
......
...@@ -635,4 +635,5 @@ explicitconstructorcall switchstatements members parens alignment declarations ...@@ -635,4 +635,5 @@ explicitconstructorcall switchstatements members parens alignment declarations
jdt continuation codegen parenthesized tabulation ellipsis imple inits guardian jdt continuation codegen parenthesized tabulation ellipsis imple inits guardian
postfix iconified deiconified deactivated activated worker frequent utilities postfix iconified deiconified deactivated activated worker frequent utilities
workers appender recovers balanced serializing breaking austria wildam workers appender recovers balanced serializing breaking austria wildam
census genealogy scapegoat gov compacted migrating dies typtypmod latch await census genealogy scapegoat gov compacted migrating dies typtypmod latch await
\ No newline at end of file counting dtest fallback
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论