提交 574eec00 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 ffb87e00
#Fri Feb 22 08:12:33 CET 2008 #Fri Mar 14 15:37:20 CET 2008
benchmark.drivers.dir=C\:/data/java benchmark.drivers.dir=C\:/data/java
javac=javac javac=javac
jdk=1.4 jdk=1.4
path.lucene.jar=C\:/data/classpath/lucene-core-2.2.0.jar path.lucene.jar=C\:/data/classpath/lucene-core-2.2.0.jar
path.servlet.jar=C\:/data/classpath/servlet-api.jar path.servlet.jar=C\:/data/classpath/servlet-api.jar
version.name.maven=1.0.67 version.name.maven=1.0.68
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
<fileset dir="src/main" includes="**/*.sql"/> <fileset dir="src/main" includes="**/*.sql"/>
<fileset dir="src/installer" includes="*.bat"/> <fileset dir="src/installer" includes="*.bat"/>
<fileset dir="src/test" includes="**/*.txt"/> <fileset dir="src/test" includes="**/*.txt"/>
<fileset dir="src/test" includes="**/*.sql"/>
<fileset dir="src/test" includes="**/*.properties"/> <fileset dir="src/test" includes="**/*.properties"/>
</copy> </copy>
</target> </target>
......
...@@ -78,7 +78,7 @@ Example: ...@@ -78,7 +78,7 @@ Example:
&lt;dependency&gt; &lt;dependency&gt;
&lt;groupId&gt;com.h2database&lt;/groupId&gt; &lt;groupId&gt;com.h2database&lt;/groupId&gt;
&lt;artifactId&gt;h2&lt;/artifactId&gt; &lt;artifactId&gt;h2&lt;/artifactId&gt;
&lt;version&gt;1.0.67&lt;/version&gt; &lt;version&gt;1.0.68&lt;/version&gt;
&lt;/dependency&gt; &lt;/dependency&gt;
</pre> </pre>
<p> <p>
......
...@@ -15,7 +15,15 @@ Change Log ...@@ -15,7 +15,15 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction. <li>Very large SELECT DISTINCT and UNION EXCEPT queries are now supported,
however this feature is disabled by default. To enable it, set
the system property h2.maxMemoryRowsDistinct to a lower value, for example 10000.
</li><li>A error is now thrown when trying to call a method
inside a trigger that implicitly commits the current transaction,
if an object is locked.
</li><li>Unused LOB files were deleted much too late.
Now they are deleted if no longer referenced in memory.
</li><li>ALTER SEQUENCE and ALTER TABLE ALTER COLUMN RESTART can now be used inside a transaction.
</li><li>New system property h2.aliasColumnName. When enabled, aliased columns </li><li>New system property h2.aliasColumnName. When enabled, aliased columns
(as in SELECT ID AS I FROM TEST) return the real table and column name in (as in SELECT ID AS I FROM TEST) return the real table and column name in
ResultSetMetaData.getTableName() and getColumnName(). This is disabled by ResultSetMetaData.getTableName() and getColumnName(). This is disabled by
...@@ -43,7 +51,7 @@ Change Log ...@@ -43,7 +51,7 @@ Change Log
way (SecureRandom.generateSeed) was very slow. Now using a daemon thread way (SecureRandom.generateSeed) was very slow. Now using a daemon thread
to avoid this problem. to avoid this problem.
</li><li>SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException. </li><li>SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException.
</li><li>When using view, the precision of column was changed to the default scale for some data types. </li><li>When using a view, the column precision was changed to the default scale for some data types.
</li><li>CSVWRITE now supports a 'null string' that is used for parsing and writing NULL. </li><li>CSVWRITE now supports a 'null string' that is used for parsing and writing NULL.
</li><li>Some long running queries could not be cancelled. </li><li>Some long running queries could not be cancelled.
</li><li>Queries with many outer join tables were very slow. Fixed. </li><li>Queries with many outer join tables were very slow. Fixed.
......
...@@ -15,16 +15,16 @@ H2 Database Engine ...@@ -15,16 +15,16 @@ H2 Database Engine
<h1>Downloads</h1> <h1>Downloads</h1>
<h3>Version 1.0.67 (2008-02-22, Current)</h3> <h3>Version 1.0.67 (2008-03-14, Current)</h3>
<p> <p>
<a href="http://www.h2database.com/h2-setup-2008-02-22.exe">Windows Installer</a><br /> <a href="http://www.h2database.com/h2-setup-2008-03-14.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-02-22.zip">Platform-Independent Zip</a><br /> <a href="http://www.h2database.com/h2-2008-03-14.zip">Platform-Independent Zip</a><br />
</p> </p>
<h3>Version 1.0.66 (2008-02-02, Last Stable)</h3> <h3>Version 1.0.66 (2008-02-22, Last Stable)</h3>
<p> <p>
<a href="http://www.h2database.com/h2-setup-2008-02-02.exe">Windows Installer</a><br /> <a href="http://www.h2database.com/h2-setup-2008-02-22.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-02-02.zip">Platform-Independent Zip</a><br /> <a href="http://www.h2database.com/h2-2008-02-22.zip">Platform-Independent Zip</a><br />
</p> </p>
<h3>Download Mirror and Older Versions</h3> <h3>Download Mirror and Older Versions</h3>
......
...@@ -12,6 +12,10 @@ H2 In Use and Links ...@@ -12,6 +12,10 @@ H2 In Use and Links
<table class="content"><tr class="content"><td class="content"><div class="contentDiv"> <table class="content"><tr class="content"><td class="content"><div class="contentDiv">
<h1>H2 In Use and Links</h1> <h1>H2 In Use and Links</h1>
<p>
Those are just a few links to products using or supporting H2.
If you want to add a link, please send it to the support email address or post it in the group.
</p>
<h2>Books</h2> <h2>Books</h2>
<a href="http://code.google.com/p/seaminaction/wiki/GettingStarted"> <a href="http://code.google.com/p/seaminaction/wiki/GettingStarted">
...@@ -176,6 +180,11 @@ A tool to manage database changes and refactorings. ...@@ -176,6 +180,11 @@ A tool to manage database changes and refactorings.
Luntbuild</a><br /> Luntbuild</a><br />
Build automation and management tool.</p> Build automation and management tool.</p>
<p><a href="http://www.source-code.biz/snippets/java/8.htm">
MiniConnectionPoolManager</a><br />
A lightweight standalone JDBC connection pool manager.
</p>
<p><a href="http://jenkov.com/mrpersister/index.html"> <p><a href="http://jenkov.com/mrpersister/index.html">
Mr. Persister</a><br /> Mr. Persister</a><br />
Simple, small and fast object relational mapping. Simple, small and fast object relational mapping.
......
...@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are: ...@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
<table style="border: 0px; margin: 5px; background-color: #eee;"> <table style="border: 0px; margin: 5px; background-color: #eee;">
<tr><td style="border: 0px; background-color: #eee;" colspan="2"> <tr><td style="border: 0px; background-color: #eee;" colspan="2">
<h3>Download</h3> <h3>Download</h3>
Version 1.0.67 (2008-02-22): Version 1.0.68 (2008-03-14):
</td></tr> </td></tr>
<tr><td style="border: 0px; background-color: #eee;"> <tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2008-02-22.exe"><img border="1" src="images/download.png" alt="download" /></a> <a href="http://www.h2database.com/h2-setup-2008-03-14.exe"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;"> </td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2008-02-22.exe">Windows Installer (2.9 MB)</a> <a href="http://www.h2database.com/h2-setup-2008-03-14.exe">Windows Installer (2.9 MB)</a>
</td></tr> </td></tr>
<tr><td style="border: 0px; background-color: #eee;"> <tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2008-02-22.zip"><img border="1" src="images/download.png" alt="download" /></a> <a href="http://www.h2database.com/h2-2008-03-14.zip"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;"> </td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2008-02-22.zip">All platforms (zip, 4.1 MB)</a> <a href="http://www.h2database.com/h2-2008-03-14.zip">All platforms (zip, 4.1 MB)</a>
</td></tr> </td></tr>
<tr><td style="border: 0px; background-color: #eee;" colspan="2"> <tr><td style="border: 0px; background-color: #eee;" colspan="2">
<a href="download.html">All Downloads</a> <a href="download.html">All Downloads</a>
......
...@@ -70,6 +70,7 @@ Initial Developer: H2 Group ...@@ -70,6 +70,7 @@ Initial Developer: H2 Group
<b>Appendix</b><br /> <b>Appendix</b><br />
<a href="build.html" target="main">Build</a><br /> <a href="build.html" target="main">Build</a><br />
<a href="history.html" target="main">History &amp; Roadmap</a><br /> <a href="history.html" target="main">History &amp; Roadmap</a><br />
<a href="links.html" target="main">Links</a><br />
<a href="faq.html" target="main">FAQ</a><br /> <a href="faq.html" target="main">FAQ</a><br />
<a href="license.html" target="main">License</a><br /> <a href="license.html" target="main">License</a><br />
<br /> <br />
......
...@@ -22,6 +22,7 @@ Initial Developer: H2 Group ...@@ -22,6 +22,7 @@ Initial Developer: H2 Group
<br /> <br />
<b>JDBC</b><br /> <b>JDBC</b><br />
org.h2.jdbc<br />
<a href="org/h2/jdbc/JdbcArray.html" target="javadoc">Array</a><br /> <a href="org/h2/jdbc/JdbcArray.html" target="javadoc">Array</a><br />
<a href="org/h2/jdbc/JdbcBlob.html" target="javadoc">Blob</a><br /> <a href="org/h2/jdbc/JdbcBlob.html" target="javadoc">Blob</a><br />
<a href="org/h2/jdbc/JdbcCallableStatement.html" target="javadoc">CallableStatement</a><br /> <a href="org/h2/jdbc/JdbcCallableStatement.html" target="javadoc">CallableStatement</a><br />
...@@ -35,10 +36,15 @@ Initial Developer: H2 Group ...@@ -35,10 +36,15 @@ Initial Developer: H2 Group
<a href="org/h2/jdbc/JdbcSavepoint.html" target="javadoc">Savepoint</a><br /> <a href="org/h2/jdbc/JdbcSavepoint.html" target="javadoc">Savepoint</a><br />
<a href="org/h2/jdbc/JdbcSQLException.html" target="javadoc">SQLException</a><br /> <a href="org/h2/jdbc/JdbcSQLException.html" target="javadoc">SQLException</a><br />
<a href="org/h2/jdbc/JdbcStatement.html" target="javadoc">Statement</a><br /> <a href="org/h2/jdbc/JdbcStatement.html" target="javadoc">Statement</a><br />
org.h2.jdbcx<br />
<a href="org/h2/jdbcx/JdbcDataSource.html" target="javadoc">DataSource</a><br />
<a href="org/h2/jdbcx/JdbcDataSourceFactory.html" target="javadoc">DataSourceFactory</a><br />
<a href="org/h2/jdbcx/JdbcXAConnection.html" target="javadoc">XAConnection</a><br />
<a href="org/h2/jdbcx/JdbcXid.html" target="javadoc">Xid</a><br />
<br /> <br />
<b>Tools</b><br /> <b>Tools</b><br />
Package org.h2.tools<br /> org.h2.tools<br />
<a href="org/h2/tools/Backup.html" target="javadoc">Backup</a><br /> <a href="org/h2/tools/Backup.html" target="javadoc">Backup</a><br />
<a href="org/h2/tools/ChangePassword.html" target="javadoc">ChangePassword</a><br /> <a href="org/h2/tools/ChangePassword.html" target="javadoc">ChangePassword</a><br />
<a href="org/h2/tools/CompressTool.html" target="javadoc">CompressTool</a><br /> <a href="org/h2/tools/CompressTool.html" target="javadoc">CompressTool</a><br />
...@@ -58,14 +64,14 @@ Package org.h2.tools<br /> ...@@ -58,14 +64,14 @@ Package org.h2.tools<br />
<br /> <br />
<b>Interfaces</b><br /> <b>Interfaces</b><br />
Package org.h2.api<br /> org.h2.api<br />
<a href="org/h2/api/AggregateFunction.html" target="javadoc">AggregateFunction</a><br /> <a href="org/h2/api/AggregateFunction.html" target="javadoc">AggregateFunction</a><br />
<a href="org/h2/api/DatabaseEventListener.html" target="javadoc">DatabaseEventListener</a><br /> <a href="org/h2/api/DatabaseEventListener.html" target="javadoc">DatabaseEventListener</a><br />
<a href="org/h2/api/Trigger.html" target="javadoc">Trigger</a><br /> <a href="org/h2/api/Trigger.html" target="javadoc">Trigger</a><br />
<br /> <br />
<b>Constants</b><br /> <b>Constants</b><br />
Package org.h2.constant<br /> org.h2.constant<br />
<a href="org/h2/constant/ErrorCode.html" target="javadoc">ErrorCode</a><br /> <a href="org/h2/constant/ErrorCode.html" target="javadoc">ErrorCode</a><br />
<a href="org/h2/constant/SysProperties.html" target="javadoc">SysProperties</a><br /> <a href="org/h2/constant/SysProperties.html" target="javadoc">SysProperties</a><br />
<br /> <br />
......
...@@ -9,7 +9,7 @@ Initial Developer: H2 Group ...@@ -9,7 +9,7 @@ Initial Developer: H2 Group
<title>H2 Documentation</title> <title>H2 Documentation</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head> </head>
<frameset cols="175,*" rows="*" frameborder="2" framespacing="4" border="4" > <frameset cols="185,*" rows="*" frameborder="2" framespacing="4" border="4" >
<frame frameborder="0" marginheight="0" marginwidth="0" src="classes.html" name="classes" /> <frame frameborder="0" marginheight="0" marginwidth="0" src="classes.html" name="classes" />
<frame frameborder="0" marginheight="0" marginwidth="0" src="overview.html" name="javadoc" /> <frame frameborder="0" marginheight="0" marginwidth="0" src="overview.html" name="javadoc" />
</frameset> </frameset>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,9 +19,13 @@ import org.h2.message.TraceSystem; ...@@ -19,9 +19,13 @@ import org.h2.message.TraceSystem;
/** /**
* The database driver. An application should not use this class directly. The * The database driver. An application should not use this class directly. The
* only thing the application needs to do is load the driver. This can be done * only thing the application needs to do is load the driver. This can be done
* using Class.forName: * using Class.forName. To load the driver and open a database connection, use
* the following code:
*
* <pre> * <pre>
* Class.forName(&quot;org.h2.Driver&quot;); * Class.forName(&quot;org.h2.Driver&quot;);
* Connection conn = DriverManager.getConnection(
* &quot;jdbc:h2:&tilde;/test&quot;, &quot;sa&quot;, &quot;sa&quot;);
* </pre> * </pre>
*/ */
public class Driver implements java.sql.Driver { public class Driver implements java.sql.Driver {
......
...@@ -217,9 +217,7 @@ public class SysProperties { ...@@ -217,9 +217,7 @@ public class SysProperties {
* more than this number of rows are in a result set, a temporary table is * more than this number of rows are in a result set, a temporary table is
* used. * used.
*/ */
private int testing; public static final int MAX_MEMORY_ROWS_DISTINCT = getIntSetting("h2.maxMemoryRowsDistinct", Integer.MAX_VALUE);
// public static final int MAX_MEMORY_ROWS_DISTINCT = getIntSetting("h2.maxMemoryRowsDistinct", Integer.MAX_VALUE);
public static final int MAX_MEMORY_ROWS_DISTINCT = getIntSetting("h2.maxMemoryRowsDistinct", 1);
/** /**
* System property <code>h2.maxQueryTimeout</code> (default: 0).<br /> * System property <code>h2.maxQueryTimeout</code> (default: 0).<br />
......
...@@ -15,8 +15,8 @@ package org.h2.engine; ...@@ -15,8 +15,8 @@ package org.h2.engine;
* - Compile with JDK 1.4, 1.5 and 1.6: * - Compile with JDK 1.4, 1.5 and 1.6:
* set path=C:\Programme\Java\jdk1.6.0\bin;%PATH% * set path=C:\Programme\Java\jdk1.6.0\bin;%PATH%
* set JAVA_HOME=C:\Programme\Java\jdk1.6.0 * set JAVA_HOME=C:\Programme\Java\jdk1.6.0
* set path=C:\Program Files\Java\jdk1.6.0_01\bin;%PATH% * set path=C:\Program Files\Java\jdk1.6.0_03\bin;%PATH%
* set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_01 * set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_03
* ant compile * ant compile
* set classpath= * set classpath=
* ant javadoc * ant javadoc
...@@ -74,8 +74,8 @@ package org.h2.engine; ...@@ -74,8 +74,8 @@ package org.h2.engine;
*/ */
public class Constants { public class Constants {
public static final int BUILD_ID = 67; public static final int BUILD_ID = 68;
private static final String BUILD = "2008-02-22"; private static final String BUILD = "2008-03-14";
public static final int VERSION_MAJOR = 1; public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0; public static final int VERSION_MINOR = 0;
......
...@@ -36,7 +36,35 @@ import org.h2.message.Message; ...@@ -36,7 +36,35 @@ import org.h2.message.Message;
/** /**
* A data source for H2 database connections. It is a factory for XAConnection * A data source for H2 database connections. It is a factory for XAConnection
* and Connection objects. This class is usually registered in a JNDI naming * and Connection objects. This class is usually registered in a JNDI naming
* service. * service. To create a data source object and register it with a JNDI service,
* use the following code:
*
* <pre>
* import org.h2.jdbcx.JdbcDataSource;
* import javax.naming.Context;
* import javax.naming.InitialContext;
* JdbcDataSource ds = new JdbcDataSource();
* ds.setURL(&quot;jdbc:h2:&tilde;/test&quot;);
* ds.setUser(&quot;sa&quot;);
* ds.setPassword(&quot;sa&quot;);
* Context ctx = new InitialContext();
* ctx.bind(&quot;jdbc/dsName&quot;, ds);
* </pre>
*
* To use a data source that is already registered, use the following code:
*
* <pre>
* import java.sql.Connection;
* import javax.sql.DataSource;
* import javax.naming.Context;
* import javax.naming.InitialContext;
* Context ctx = new InitialContext();
* DataSource ds = (DataSource) ctx.lookup(&quot;jdbc/dsName&quot;);
* Connection conn = ds.getConnection();
* </pre>
*
* In this example the user name and password are serialized as
* well; this may be a security problem in some cases.
*/ */
public class JdbcDataSource extends TraceObject public class JdbcDataSource extends TraceObject
//#ifdef JDK14 //#ifdef JDK14
...@@ -58,7 +86,7 @@ implements XADataSource, DataSource, ConnectionPoolDataSource, Serializable, Ref ...@@ -58,7 +86,7 @@ implements XADataSource, DataSource, ConnectionPoolDataSource, Serializable, Ref
} }
/** /**
* Public constructor. * The public constructor.
*/ */
public JdbcDataSource() { public JdbcDataSource() {
initFactory(); initFactory();
......
...@@ -20,7 +20,8 @@ import org.h2.message.Trace; ...@@ -20,7 +20,8 @@ import org.h2.message.Trace;
import org.h2.message.TraceSystem; import org.h2.message.TraceSystem;
/** /**
* This class is used to create new JdbcDataSource objects. * This class is used to create new DataSource objects.
* An application should not use this class directly.
*/ */
public class JdbcDataSourceFactory public class JdbcDataSourceFactory
//#ifdef JDK14 //#ifdef JDK14
......
...@@ -97,7 +97,7 @@ public class ResultTempTable implements ResultExternal { ...@@ -97,7 +97,7 @@ public class ResultTempTable implements ResultExternal {
table.removeChildrenAndResources(session); table.removeChildrenAndResources(session);
} }
} catch (SQLException e) { } catch (SQLException e) {
throw Message.getInternalError(); throw Message.convertToInternal(e);
} finally { } finally {
table = null; table = null;
} }
......
...@@ -151,7 +151,16 @@ public class RowList { ...@@ -151,7 +151,16 @@ public class RowList {
int storageId = buff.readInt(); int storageId = buff.readInt();
Value[] values = new Value[columnCount]; Value[] values = new Value[columnCount];
for (int i = 0; i < columnCount; i++) { for (int i = 0; i < columnCount; i++) {
values[i] = buff.readValue(); Value v = buff.readValue();
if (v.isLinked()) {
ValueLob lob = (ValueLob) v;
// the table id is 0 if it was linked when writing
// a temporary entry
if (lob.getTableId() == 0) {
session.unlinkAtCommit(v);
}
}
values[i] = v;
} }
if (pos != 0) { if (pos != 0) {
CacheObject found = cache.find(pos); CacheObject found = cache.find(pos);
......
...@@ -25,6 +25,7 @@ import org.h2.util.StringUtils; ...@@ -25,6 +25,7 @@ import org.h2.util.StringUtils;
public class Newsfeed { public class Newsfeed {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String targetDir = args.length == 0 ? "." : args[0];
Class.forName("org.h2.Driver"); Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:mem:", "sa", ""); Connection conn = DriverManager.getConnection("jdbc:h2:mem:", "sa", "");
InputStream in = Newsfeed.class.getResourceAsStream("newsfeed.sql"); InputStream in = Newsfeed.class.getResourceAsStream("newsfeed.sql");
...@@ -32,15 +33,14 @@ public class Newsfeed { ...@@ -32,15 +33,14 @@ public class Newsfeed {
while (rs.next()) { while (rs.next()) {
String file = rs.getString("FILE"); String file = rs.getString("FILE");
String content = rs.getString("CONTENT"); String content = rs.getString("CONTENT");
if (file.equals("-newsletter-")) { if (file.endsWith(".txt")) {
System.out.println(convertHtml2Text(content)); content = convertHtml2Text(content);
} else { }
FileOutputStream out = new FileOutputStream(file); FileOutputStream out = new FileOutputStream(targetDir + "/" + file);
Writer writer = new OutputStreamWriter(out, "UTF-8"); Writer writer = new OutputStreamWriter(out, "UTF-8");
writer.write(content); writer.write(content);
writer.close(); writer.close();
out.close(); out.close();
}
} }
conn.close(); conn.close();
} }
......
...@@ -10,6 +10,49 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' , ...@@ -10,6 +10,49 @@ 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(38,
'New version available: 1.0.68 (2008-03-14)', '2008-03-14 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>Faster text comparison when using a collator.
</li><li>CSVWRITE now supports a ''null string'' to parse NULL.
</li><li>UPDATE SET column=DEFAULT is now supported.
</li><li>Large SELECT DISTINCT and UNION queries are now supported
(this is disabled by default).
</li><li>Committing inside a trigger is not allowed any more.
</li><li>ALTER SEQUENCE can now be used inside a transaction.
</li><li>New system property h2.aliasColumnName. When enabled, aliased columns
return the real table and column name in ResultSetMetaData calls.
</li><li>Improved performance when using lob files in directories
(however this is still disabled by default)
</li><li>Fulltext search: new method SEARCH_DATA.
</li><li>New experimental optimization for GROUP BY queries.
</li><li>Better browser starting for the H2 Console on Linux.
</li><li>Improved support for IKVM.
</li></ul>
<b>Bugfixes:</b>
<ul><li>With MVCC=TRUE, duplicate rows could appear in the result set.
</li><li>Queries with many outer join tables were very slow.
</li><li>Unused LOB files were deleted much too late.
</li><li>H2 Console: remote connections were very slow.
</li><li>H2 Console: autocomplete didn''t work with very large scripts.
</li><li>H2 Console: improved compatibility with Safari (Safari requires keep-alive)
</li><li>Random: the process didn''t stop if generateSeed was very slow.
</li><li>SELECT UNION with a different number of ORDER BY columns didn''t work.
</li><li>When using a view, the column precision was wrong sometimes.
</li><li>Some long running queries could not be cancelled.
</li><li>When using encrypted databases, and using the wrong file password,
the log file was renamed 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
');
INSERT INTO ITEM VALUES(37, INSERT INTO ITEM VALUES(37,
'New version available: 1.0.67 (2008-02-22)', '2008-02-22 12:00:00', 'New version available: 1.0.67 (2008-02-22)', '2008-02-22 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>. 'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
...@@ -300,43 +343,6 @@ INSERT INTO ITEM VALUES(29, ...@@ -300,43 +343,6 @@ INSERT INTO ITEM VALUES(29,
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
'); ');
INSERT INTO ITEM VALUES(28,
'New version available: 1.0.58 (2007-09-15)', '2007-09-15 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>Empty space in the database files is now better reused
</li><li>The database file sizes now increased in smaller blocks
</li><li>Optimization for independent subqueries
</li><li>Improved explain plan
</li><li>Maven 2: new version are now automatically synced
</li><li>The version (build) number is now included in the manifest file.
</li><li>The default value for MAX_MEMORY_UNDO is now 100000
</li><li>Improved MultiDimension tool (for spatial queries)
</li><li>New method DatabaseEventListener.opened
</li><li>Optimization for COLUMN IN(.., NULL)
</li><li>Oracle compatibility for SYSDATE and CHR
</li><li>System.exit is no longer called by the WebServer
</li></ul>
<b>Bugfixes:</b>
<ul><li>About 230 bytes per database was leaked
</li><li>Using spaces in column and table aliases did not always work
</li><li>In some systems, SecureRandom.generateSeed is very slow
</li><li>Console: better support for Internet Explorer
</li><li>A database can now be opened even if user class is missing
</li><li>User defined functions may not overload built-in functions
</li><li>Adding a foreign key failed when the reference contained NULL
</li><li>For PgServer, character encoding other than UTF-8 did not work
</li><li>When using IFNULL, NULLIF, COALESCE, LEAST, or GREATEST,
and the first parameter was ?, an exception was thrown
</li><li>When comparing TINYINT or SMALLINT columns, the index was not used
</li><li>The documentation indexer does no longer index Japanese pages
</li><li>Using a function in a GROUP BY expression did not always work
</li></ul>
For future plans, see the new ''Roadmap'' page on the web site.
');
SELECT 'newsfeed-rss.xml' FILE, SELECT 'newsfeed-rss.xml' FILE,
XMLSTARTDOC() || XMLSTARTDOC() ||
XMLNODE('rss', XMLATTR('version', '2.0'), XMLNODE('rss', XMLATTR('version', '2.0'),
...@@ -378,4 +384,4 @@ SELECT 'newsfeed-atom.xml' FILE, ...@@ -378,4 +384,4 @@ SELECT 'newsfeed-atom.xml' FILE,
) CONTENT ) CONTENT
FROM CHANNEL C, ITEM I FROM CHANNEL C, ITEM I
UNION UNION
SELECT '-newsletter-' FILE, I.DESC CONTENT FROM ITEM I WHERE I.ID = (SELECT MAX(ID) FROM ITEM) SELECT 'newsletter.txt' FILE, I.DESC CONTENT FROM ITEM I WHERE I.ID = (SELECT MAX(ID) FROM ITEM)
...@@ -159,12 +159,13 @@ java org.h2.test.TestAll timer ...@@ -159,12 +159,13 @@ java org.h2.test.TestAll timer
/* /*
disk based select distinct; order by: Allow to set all passwords as parameters
Remove Parser.readString()
more tests with disk based select distinct; order by:
select distinct x from system_range(1, 200000);
DROP TABLE TEST; DROP TABLE TEST;
CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255), VALUE DECIMAL(10,2)); CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255), VALUE DECIMAL(10,2));
INSERT INTO TEST VALUES(1,'Apples',1.20), INSERT INTO TEST VALUES(1,'Apples',1.20),
(2,'Oranges',2.05), (2,'Oranges',2.05),
(3,'Cherries',5.10), (3,'Cherries',5.10),
...@@ -174,36 +175,38 @@ INSERT INTO TEST VALUES(1,'Apples',1.20), ...@@ -174,36 +175,38 @@ INSERT INTO TEST VALUES(1,'Apples',1.20),
(7,'Bananas',2.50), (7,'Bananas',2.50),
(8,NULL,3.10), (8,NULL,3.10),
(9,NULL,-10.0); (9,NULL,-10.0);
SELECT DISTINCT NAME FROM TEST; SELECT DISTINCT NAME FROM TEST;
select distinct x from system_range(1, 200000);
CREATE TABLE p(d DATE); CREATE TABLE p(d DATE);
INSERT INTO p VALUES('0000-01-01'); INSERT INTO p VALUES('0000-01-01');
INSERT INTO p VALUES('0001-01-01'); INSERT INTO p VALUES('0001-01-01');
check that test data in temp directories
add jdbcx to Javadocs
out of memory problem: out of memory problem:
java -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -cp bin/h2.jar org.h2.tools.Server -log true java -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m
-cp bin/h2.jar org.h2.tools.Server -log true
jdbc:h2:test;CACHE_SIZE=10000 jdbc:h2:test;CACHE_SIZE=10000
drop all objects; drop all objects;
CREATE TABLE firsttable (id number(8) primary key, name varchar(200) not null); CREATE TABLE test (field1 number(10) not null, field2 number(8));
CREATE TABLE secondtable (field1 number(10) not null, field2 number(8)); @LOOP 1000000 insert into test values(?, ?);
@LOOP 1000000 insert into secondtable values(?, ?); create index idx_number1 on test(field1);
create index idx_number1 on secondtable(field1); The table 'test' contains a little over 100.000.000 records.
The table 'secondtable' contains a little over 100.000.000 records.
Read HenPlus features Read HenPlus features
http://henplus.sourceforge.net/ http://henplus.sourceforge.net/
newsletter.sql better document DataSource usage in an own section in the Tutorial.
Including Pooling if possible
link to or include
http://www.source-code.biz/snippets/java/8.htm
add regular javadocs to the homepage
the database should be kept open for a longer time when using the server mode
add link to new in use, links add link to new in use, links
Javadocs: for each tool, add a copy & paste sample in the class level
Add google site search to web page Add google site search to web page
merge query and result frames merge query and result frames
...@@ -230,13 +233,6 @@ Can sometimes not delete log file? need test case ...@@ -230,13 +233,6 @@ Can sometimes not delete log file? need test case
Add where required // TODO: change in version 1.1 Add where required // TODO: change in version 1.1
History: History:
Very large SELECT DISTINCT and UNION EXCEPT queries are now supported.
Improved support for IKVM.
A error is now thrown when trying to call a method
inside a trigger that implicitly commits the current transaction,
if an object is locked.
Unused LOB files were deleted much too late.
Now they are deleted if no longer referenced in memory.
Roadmap: Roadmap:
......
...@@ -30,7 +30,8 @@ import org.h2.tools.DeleteDbFiles; ...@@ -30,7 +30,8 @@ import org.h2.tools.DeleteDbFiles;
*/ */
public abstract class TestBase { public abstract class TestBase {
// private static final String BASE_TEST_DIR = System.getProperty("java.io.tmpdir") + "/h2"; // private static final String BASE_TEST_DIR =
// System.getProperty("java.io.tmpdir") + "/h2";
private static final String BASE_TEST_DIR = "data"; private static final String BASE_TEST_DIR = "data";
public static String getTestDir(String name) { public static String getTestDir(String name) {
......
...@@ -22,35 +22,35 @@ import org.h2.test.TestBase; ...@@ -22,35 +22,35 @@ import org.h2.test.TestBase;
*/ */
public class TestDataSource extends TestBase { public class TestDataSource extends TestBase {
// public static void main(String[] args) throws Exception { // public static void main(String[] args) throws Exception {
// //
// // first, need to start on the command line: // // first, need to start on the command line:
// // rmiregistry 1099 // // rmiregistry 1099
// //
// // System.setProperty(Context.INITIAL_CONTEXT_FACTORY, // // System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
// "com.sun.jndi.ldap.LdapCtxFactory"); // "com.sun.jndi.ldap.LdapCtxFactory");
// System.setProperty(Context.INITIAL_CONTEXT_FACTORY, // System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
// "com.sun.jndi.rmi.registry.RegistryContextFactory"); // "com.sun.jndi.rmi.registry.RegistryContextFactory");
// System.setProperty(Context.PROVIDER_URL, "rmi://localhost:1099"); // System.setProperty(Context.PROVIDER_URL, "rmi://localhost:1099");
// //
// JdbcDataSource ds = new JdbcDataSource(); // JdbcDataSource ds = new JdbcDataSource();
// ds.setURL("jdbc:h2:test"); // ds.setURL("jdbc:h2:test");
// ds.setUser("test"); // ds.setUser("test");
// ds.setPassword(""); // ds.setPassword("");
// //
// Context ctx = new InitialContext(); // Context ctx = new InitialContext();
// ctx.bind("jdbc/test", ds); // ctx.bind("jdbc/test", ds);
// //
// DataSource ds2 = (DataSource)ctx.lookup("jdbc/test"); // DataSource ds2 = (DataSource)ctx.lookup("jdbc/test");
// Connection conn = ds2.getConnection(); // Connection conn = ds2.getConnection();
// conn.close(); // conn.close();
// } // }
public void test() throws Exception { public void test() throws Exception {
testDataSource(); testDataSource();
testXAConnection(); testXAConnection();
} }
private void testXAConnection() throws Exception { private void testXAConnection() throws Exception {
deleteDb(baseDir, "dataSource"); deleteDb(baseDir, "dataSource");
JdbcDataSource ds = new JdbcDataSource(); JdbcDataSource ds = new JdbcDataSource();
......
...@@ -22,7 +22,7 @@ public class CheckTextFiles { ...@@ -22,7 +22,7 @@ public class CheckTextFiles {
} }
String[] suffixCheck = new String[] { "html", "jsp", "js", "css", "bat", "nsi", "java", "txt", "properties", "sql", String[] suffixCheck = new String[] { "html", "jsp", "js", "css", "bat", "nsi", "java", "txt", "properties", "sql",
"xml", "csv", "Driver", "php" }; "xml", "csv", "Driver" };
String[] suffixIgnore = new String[] { "gif", "png", "odg", "ico", "sxd", "layout", "res", "win", "jar", "task" }; String[] suffixIgnore = new String[] { "gif", "png", "odg", "ico", "sxd", "layout", "res", "win", "jar", "task" };
boolean failOnError; boolean failOnError;
boolean allowTab, allowCR = true, allowTrailingSpaces = true; boolean allowTab, allowCR = true, allowTrailingSpaces = true;
......
...@@ -25,16 +25,18 @@ public class MergeDocs { ...@@ -25,16 +25,18 @@ public class MergeDocs {
} }
private void run(String[] args) throws Exception { private void run(String[] args) throws Exception {
// the order of pages is important here
String[] pages = { "quickstartText.html", "installation.html", "tutorial.html", "features.html", String[] pages = { "quickstartText.html", "installation.html", "tutorial.html", "features.html",
"performance.html", "advanced.html", "grammar.html", "functions.html", "datatypes.html", "build.html", "performance.html", "advanced.html", "grammar.html", "functions.html", "datatypes.html", "build.html",
"history.html", "faq.html", "license.html" }; "history.html", "faq.html", "license.html" };
StringBuffer buff = new StringBuffer(); StringBuffer buff = new StringBuffer();
for (int i = 0; i < pages.length; i++) { for (int i = 0; i < pages.length; i++) {
String text = getContent(pages[i]); String fileName = pages[i];
String text = getContent(fileName);
for (int j = 0; j < pages.length; j++) { for (int j = 0; j < pages.length; j++) {
text = StringUtils.replaceAll(text, pages[j] + "#", "#"); text = StringUtils.replaceAll(text, pages[j] + "#", "#");
} }
text = removeHeaderFooter(text); text = removeHeaderFooter(fileName, text);
buff.append(text); buff.append(text);
} }
String finalText = buff.toString(); String finalText = buff.toString();
...@@ -48,7 +50,7 @@ public class MergeDocs { ...@@ -48,7 +50,7 @@ public class MergeDocs {
writer.close(); writer.close();
} }
private String removeHeaderFooter(String text) { private String removeHeaderFooter(String fileName, String text) {
// String start = "<body"; // String start = "<body";
// String end = "</body>"; // String end = "</body>";
...@@ -56,6 +58,9 @@ public class MergeDocs { ...@@ -56,6 +58,9 @@ public class MergeDocs {
String end = "</div></td></tr></table><!-- analytics --></body></html>"; String end = "</div></td></tr></table><!-- analytics --></body></html>";
int idx = text.indexOf(end); int idx = text.indexOf(end);
if (idx < 0) {
throw new Error("Footer not found in file " + fileName);
}
text = text.substring(0, idx); text = text.substring(0, idx);
idx = text.indexOf(start); idx = text.indexOf(start);
idx = text.indexOf('>', idx); idx = text.indexOf('>', idx);
......
...@@ -33,7 +33,7 @@ public class SpellChecker { ...@@ -33,7 +33,7 @@ public class SpellChecker {
private boolean printDictionary = false; private boolean printDictionary = false;
private boolean addToDictionary; private boolean addToDictionary;
private static final String[] SUFFIX = new String[] { "html", "java", "sql", "txt", "xml", "jsp", "css", "bat", private static final String[] SUFFIX = new String[] { "html", "java", "sql", "txt", "xml", "jsp", "css", "bat",
"csv", "xml", "js", "Driver", "properties", "task", "php", "" }; "csv", "xml", "js", "Driver", "properties", "task", "" };
private static final String[] IGNORE = new String[] { "dev", "nsi", "gif", "png", "odg", "ico", "sxd", "zip", private static final String[] IGNORE = new String[] { "dev", "nsi", "gif", "png", "odg", "ico", "sxd", "zip",
"bz2", "rc", "layout", "res", "dll", "jar" }; "bz2", "rc", "layout", "res", "dll", "jar" };
private static final String PREFIX_IGNORE = "abc"; private static final String PREFIX_IGNORE = "abc";
......
...@@ -10,6 +10,7 @@ import java.io.FileInputStream; ...@@ -10,6 +10,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import org.h2.samples.Newsfeed;
import org.h2.util.IOUtils; import org.h2.util.IOUtils;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
...@@ -17,6 +18,7 @@ import org.h2.util.StringUtils; ...@@ -17,6 +18,7 @@ import org.h2.util.StringUtils;
* Create the web site, mainly by copying the regular docs. A few items are * Create the web site, mainly by copying the regular docs. A few items are
* different in the web site, for example it calls web site analytics. * different in the web site, for example it calls web site analytics.
* Also, the main entry point page is different. * Also, the main entry point page is different.
* The newsfeeds are generated here as well.
*/ */
public class WebSite { public class WebSite {
...@@ -25,7 +27,7 @@ public class WebSite { ...@@ -25,7 +27,7 @@ public class WebSite {
private static final String ANALYTICS_TAG = "<!-- analytics -->"; private static final String ANALYTICS_TAG = "<!-- analytics -->";
private static final String ANALYTICS_SCRIPT = private static final String ANALYTICS_SCRIPT =
"<script src='http://www.google-analytics.com/ga.js' type=\"text/javascript\" />\n" + "<script src=\"http://www.google-analytics.com/ga.js\" type=\"text/javascript\"></script>\n" +
"<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>"; "<script type=\"text/javascript\">var pageTracker=_gat._getTracker(\"UA-2351060-1\");pageTracker._initData();pageTracker._trackPageview();</script>";
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
...@@ -35,6 +37,7 @@ public class WebSite { ...@@ -35,6 +37,7 @@ public class WebSite {
private void run() throws Exception { private void run() throws Exception {
deleteRecursive(new File(targetDir)); deleteRecursive(new File(targetDir));
copy(new File(sourceDir), new File(targetDir)); copy(new File(sourceDir), new File(targetDir));
Newsfeed.main(new String[] {"dataWeb/html"});
} }
private void deleteRecursive(File dir) { private void deleteRecursive(File dir) {
......
...@@ -482,4 +482,5 @@ xmlstartdoc xmltext xor xrmd xrunhprof xsi xsm xtea xti xtime xts xvi xyz yacute ...@@ -482,4 +482,5 @@ xmlstartdoc xmltext xor xrmd xrunhprof xsi xsm xtea xti xtime xts xvi xyz yacute
year yen yes yet yield yielding ymd you your yourkit yourself ytd yuml yusuke year yen yes yet yield yielding ymd you your yourkit yourself ytd yuml yusuke
yyyy zeile zero zeros zeta zip zloty zone zwj zwnj yyyy zeile zero zeros zeta zip zloty zone zwj zwnj
cron ide pageview track gat analytics tracker implicitly ignores cron ide pageview track gat analytics tracker implicitly ignores pro providers
\ No newline at end of file tmpdir mini
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论