提交 74108a40 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 7c091a02
...@@ -1006,13 +1006,14 @@ public class MetaTable extends Table { ...@@ -1006,13 +1006,14 @@ public class MetaTable extends Table {
} }
String columnList = null; String columnList = null;
if(columns != null) { if(columns != null) {
columnList = ""; StringBuffer buff = new StringBuffer();
for(int j=0; j<columns.length; j++) { for(int j=0; j<columns.length; j++) {
if(j>0) { if(j>0) {
columnList += ","; buff.append(',');
} }
columnList += columns[j].getName(); buff.append(columns[j].getName());
} }
columnList = buff.toString();
} }
add(rows, new String[] { add(rows, new String[] {
catalog, // CONSTRAINT_CATALOG catalog, // CONSTRAINT_CATALOG
......
...@@ -37,12 +37,12 @@ public class Backup { ...@@ -37,12 +37,12 @@ public class Backup {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-url jdbc:h2:... (database URL) * </li><li>-url jdbc:h2:... (database URL)
* <li>-user username * </li><li>-user username
* <li>-password password * </li><li>-password password
* <li>-script filename (default file name is backup.sql) * </li><li>-script filename (default file name is backup.sql)
* <li>-options to specify a list of options (only for H2) * </li><li>-options to specify a list of options (only for H2)
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws SQLException * @throws SQLException
......
...@@ -39,13 +39,13 @@ public class ChangePassword extends FileBase { ...@@ -39,13 +39,13 @@ public class ChangePassword extends FileBase {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-dir directory (the default is the current directory) * </li><li>-dir directory (the default is the current directory)
* <li>-db databaseName (all databases if no name is specified) * </li><li>-db databaseName (all databases if no name is specified)
* <li>-cipher type (AES or XTEA) * </li><li>-cipher type (AES or XTEA)
* <li>-decrypt password (null if the database is not encrypted) * </li><li>-decrypt password (null if the database is not encrypted)
* <li>-encrypt password (null if the database should not be encrypted) * </li><li>-encrypt password (null if the database should not be encrypted)
* <li>-quiet does not print progress information * </li><li>-quiet does not print progress information
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws SQLException * @throws SQLException
......
...@@ -30,10 +30,10 @@ public class ConvertTraceFile { ...@@ -30,10 +30,10 @@ public class ConvertTraceFile {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-traceFile filename (the default is test.trace.db) * </li><li>-traceFile filename (the default is test.trace.db)
* <li>-script filename (the default is test.sql) * </li><li>-script filename (the default is test.sql)
* <li>-javaClass className (the default is Test) * </li><li>-javaClass className (the default is Test)
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws Exception * @throws Exception
......
...@@ -31,9 +31,9 @@ public class CreateCluster { ...@@ -31,9 +31,9 @@ public class CreateCluster {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-urlSource jdbc:h2:... (the database URL of the source database) * </li><li>-urlSource jdbc:h2:... (the database URL of the source database)
* <li>-urlTarget jdbc:h2:... (the database URL of the target database) * </li><li>-urlTarget jdbc:h2:... (the database URL of the target database)
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws SQLException * @throws SQLException
......
...@@ -107,7 +107,7 @@ public class Csv implements SimpleRowSource { ...@@ -107,7 +107,7 @@ public class Csv implements SimpleRowSource {
columnNames = colNames; columnNames = colNames;
initRead(); initRead();
SimpleResultSet result = new SimpleResultSet(this); SimpleResultSet result = new SimpleResultSet(this);
normalizeColumnNames(); makeColumnNamesUnique();
for(int i=0; i<columnNames.length; i++) { for(int i=0; i<columnNames.length; i++) {
result.addColumn(columnNames[i], Types.VARCHAR, 255, 0); result.addColumn(columnNames[i], Types.VARCHAR, 255, 0);
} }
...@@ -135,7 +135,7 @@ public class Csv implements SimpleRowSource { ...@@ -135,7 +135,7 @@ public class Csv implements SimpleRowSource {
this.reader = reader; this.reader = reader;
initRead(); initRead();
SimpleResultSet result = new SimpleResultSet(this); SimpleResultSet result = new SimpleResultSet(this);
normalizeColumnNames(); makeColumnNamesUnique();
for(int i=0; i<columnNames.length; i++) { for(int i=0; i<columnNames.length; i++) {
result.addColumn(columnNames[i], Types.VARCHAR, 255, 0); result.addColumn(columnNames[i], Types.VARCHAR, 255, 0);
} }
...@@ -145,7 +145,7 @@ public class Csv implements SimpleRowSource { ...@@ -145,7 +145,7 @@ public class Csv implements SimpleRowSource {
} }
} }
private void normalizeColumnNames() { private void makeColumnNamesUnique() {
for(int i=0; i<columnNames.length; i++) { for(int i=0; i<columnNames.length; i++) {
String x = columnNames[i]; String x = columnNames[i];
if(x == null || x.length()==0) { if(x == null || x.length()==0) {
......
...@@ -29,10 +29,10 @@ public class DeleteDbFiles extends FileBase { ...@@ -29,10 +29,10 @@ public class DeleteDbFiles extends FileBase {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-dir directory (the default is the current directory) * </li><li>-dir directory (the default is the current directory)
* <li>-db databaseName (all databases if no name is specified) * </li><li>-db databaseName (all databases if no name is specified)
* <li>-quiet does not print progress information * </li><li>-quiet does not print progress information
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws SQLException * @throws SQLException
......
...@@ -74,10 +74,10 @@ public class Recover implements DataHandler { ...@@ -74,10 +74,10 @@ public class Recover implements DataHandler {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-dir directory (the default is the current directory) * </li><li>-dir directory (the default is the current directory)
* <li>-db databaseName (all databases if no name is specified) * </li><li>-db databaseName (all databases if no name is specified)
* <li>-log {true|false} (log additional messages) * </li><li>-log {true|false} (log additional messages)
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws SQLException * @throws SQLException
......
...@@ -44,13 +44,13 @@ public class RunScript { ...@@ -44,13 +44,13 @@ public class RunScript {
* following options are supported: * following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-url jdbc:h2:... (database URL) * </li><li>-url jdbc:h2:... (database URL)
* <li>-user username * </li><li>-user username
* <li>-password password * </li><li>-password password
* <li>-script filename (default file name is backup.sql) * </li><li>-script filename (default file name is backup.sql)
* <li>-driver driver the JDBC driver class name (not required for H2) * </li><li>-driver driver the JDBC driver class name (not required for H2)
* <li>-options to specify a list of options (only for H2 and only when using the embedded mode) * </li><li>-options to specify a list of options (only for H2 and only when using the embedded mode)
* </ul> * </li></ul>
* To include local files when using remote databases, use the special syntax: * To include local files when using remote databases, use the special syntax:
* <pre> * <pre>
* &#64;INCLUDE fileName * &#64;INCLUDE fileName
......
...@@ -72,34 +72,34 @@ public class Server implements Runnable { ...@@ -72,34 +72,34 @@ public class Server implements Runnable {
* The following options are supported: * The following options are supported:
* <ul> * <ul>
* <li>-help or -? (print the list of options) * <li>-help or -? (print the list of options)
* <li>-web (start the Web Server) * </li><li>-web (start the Web Server)
* <li>-tcp (start the TCP Server) * </li><li>-tcp (start the TCP Server)
* <li>-tcpShutdown {url} (shutdown the running TCP Server, URL example: tcp://localhost:9094) * </li><li>-tcpShutdown {url} (shutdown the running TCP Server, URL example: tcp://localhost:9094)
* <li>-odbc (start the ODBC Server) * </li><li>-odbc (start the ODBC Server)
* <li>-browser (start a browser and open a page to connect to the Web Server) * </li><li>-browser (start a browser and open a page to connect to the Web Server)
* <li>-log [true|false] (enable or disable logging) * </li><li>-log [true|false] (enable or disable logging)
* <li>-baseDir {directory} (sets the base directory for database files) * </li><li>-baseDir {directory} (sets the base directory for database files)
* <li>-ifExists [true|false] (only existing databases may be opened) * </li><li>-ifExists [true|false] (only existing databases may be opened)
* <li>-ftp (start the FTP Server) * </li><li>-ftp (start the FTP Server)
* </ul> * </li></ul>
* For each Server, there are additional options available: * For each Server, there are additional options available:
* <ul> * <ul>
* <li>-webPort {port} (the port of Web Server, default: 8082) * <li>-webPort {port} (the port of Web Server, default: 8082)
* <li>-webSSL [true|false] (if SSL should be used) * </li><li>-webSSL [true|false] (if SSL should be used)
* <li>-webAllowOthers [true|false] (enable/disable remote connections) * </li><li>-webAllowOthers [true|false] (enable/disable remote connections)
* <li>-tcpPort {port} (the port of TCP Server, default: 9092) * </li><li>-tcpPort {port} (the port of TCP Server, default: 9092)
* <li>-tcpSSL [true|false] (if SSL should be used) * </li><li>-tcpSSL [true|false] (if SSL should be used)
* <li>-tcpAllowOthers [true|false] (enable/disable remote connections) * </li><li>-tcpAllowOthers [true|false] (enable/disable remote connections)
* <li>-tcpPassword {password} (the password for shutting down a TCP Server) * </li><li>-tcpPassword {password} (the password for shutting down a TCP Server)
* <li>-tcpShutdownForce [true|false] (don't wait for other connections to close) * </li><li>-tcpShutdownForce [true|false] (don't wait for other connections to close)
* <li>-odbcPort {port} (the port of ODBC Server, default: 9083) * </li><li>-odbcPort {port} (the port of ODBC Server, default: 9083)
* <li>-odbcAllowOthers [true|false] (enable/disable remote connections) * </li><li>-odbcAllowOthers [true|false] (enable/disable remote connections)
* <li>-ftpPort {port} * </li><li>-ftpPort {port}
* <li>-ftpDir {directory} * </li><li>-ftpDir {directory}
* <li>-ftpRead {readUserName} * </li><li>-ftpRead {readUserName}
* <li>-ftpWrite {writeUserName} * </li><li>-ftpWrite {writeUserName}
* <li>-ftpWritePassword {password} * </li><li>-ftpWritePassword {password}
* </ul> * </li></ul>
* *
* @param args the command line arguments * @param args the command line arguments
* @throws SQLException * @throws SQLException
......
...@@ -45,9 +45,12 @@ public class Newsfeed { ...@@ -45,9 +45,12 @@ public class Newsfeed {
s = StringUtils.replaceAll(s, "<ul>", ""); s = StringUtils.replaceAll(s, "<ul>", "");
s = StringUtils.replaceAll(s, "</ul>", ""); s = StringUtils.replaceAll(s, "</ul>", "");
s = StringUtils.replaceAll(s, "<li>", "- "); s = StringUtils.replaceAll(s, "<li>", "- ");
s = StringUtils.replaceAll(s, "</li>", "");
s = StringUtils.replaceAll(s, "<a href=\"", "( "); s = StringUtils.replaceAll(s, "<a href=\"", "( ");
s = StringUtils.replaceAll(s, "\">", " ) "); s = StringUtils.replaceAll(s, "\">", " ) ");
s = StringUtils.replaceAll(s, "</a>", ""); s = StringUtils.replaceAll(s, "</a>", "");
s = StringUtils.replaceAll(s, "<br />", "");
s = StringUtils.replaceAll(s, "<br/>", "");
s = StringUtils.replaceAll(s, "<br>", ""); s = StringUtils.replaceAll(s, "<br>", "");
if(s.indexOf('<') >= 0 || s.indexOf('>') >= 0) { if(s.indexOf('<') >= 0 || s.indexOf('>') >= 0) {
throw new Error("Unsupported HTML Tag: < or > in " + s); throw new Error("Unsupported HTML Tag: < or > in " + s);
......
...@@ -10,36 +10,63 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' , ...@@ -10,36 +10,63 @@ 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(21,
'New version available: 1.0 / 2007-01-30', '2007-01-30 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
<br />
<b>Changes and new functionality:</b>
<ul>
<li>Experimental online backup feature using the SQL statement BACKUP TO ''fileName''.</li>
<li>Temporary files are now deleted earlier.</li>
<li>Benchmark: Added a multi-client test case, BenchB (similar to TPC-B).</li>
<li>The Console is now translated to Hungarian thanks to Andras Hideg, and to Indonesian thanks to Joko Yuliantoro.</li>
<li>Can now use UUID columns as generated key values.</li>
</ul>
<b>Bugfixes:</b>
<ul>
<li>In some situations, it was possible that SUM threw a class cast exception.</li>
<li>Compatibility: SCHEMA_NAME.SEQUENCE_NAME.NEXTVAL now works as expected.</li>
<li>XAConnection: A NullPointerException was thrown if addConnectionEventListener was called before opening the connection.</li>
<li>In case the result set of a subquery was re-used, an exception was throws if the subquery result did not fit in memory.</li>
<li>The command "drop all objects delete files" did not work on Linux.</li>
<li>DataSource: improved exception when setting the URL to an empty string.</li>
<li>Parsing of LIKE .. ESCAPE did not stop at the expected point.</li>
<li>Forum subscriptions (the emails sent from the forum) now work.</li>
</ul>
For future plans, see the new ''Roadmap'' page on the web site.
</ul>
');
INSERT INTO ITEM VALUES(20, INSERT INTO ITEM VALUES(20,
'New version available: 1.0 / 2007-01-17', '2007-01-17 12:00:00', 'New version available: 1.0 / 2007-01-17', '2007-01-17 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>The Console is now translated to Japanese thanks to <li>The Console is now translated to Japanese thanks to
IKEMOTO, Masahiro (ikeyan (at) arizona (dot) ne (dot) jp). IKEMOTO, Masahiro (ikeyan (at) arizona (dot) ne (dot) jp).
<li>The database engine can now be compiled with JDK 1.3 using ant codeswitch_jdk13. </li><li>The database engine can now be compiled with JDK 1.3 using ant codeswitch_jdk13.
There are still some limitations, and the ant script to build the jar does not work yet. There are still some limitations, and the ant script to build the jar does not work yet.
<li>SCRIPT NODATA now writes the row count for each table. </li><li>SCRIPT NODATA now writes the row count for each table.
<li>Timestamps with timezone information (Z or +/-hh:mm) and dates before year 1 </li><li>Timestamps with timezone information (Z or +/-hh:mm) and dates before year 1
can now be parsed. However dates before year 1 are not formatted correctly. can now be parsed. However dates before year 1 are not formatted correctly.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Fixed a problem where data in the log file was not written to the data file <li>Fixed a problem where data in the log file was not written to the data file
(recovery failure) after a crash, if an index was deleted previously. (recovery failure) after a crash, if an index was deleted previously.
<li>Setting the collation (SET COLLATOR) was very slow on some systems (up to 24 seconds). </li><li>Setting the collation (SET COLLATOR) was very slow on some systems (up to 24 seconds).
<li>Selecting a column using the syntax schemaName.tableName.columnName did not work in all cases. </li><li>Selecting a column using the syntax schemaName.tableName.columnName did not work in all cases.
<li>When stopping the TCP server from an application and immediately afterwards starting </li><li>When stopping the TCP server from an application and immediately afterwards starting
it again using a different TCP password, an exception was thrown sometimes. it again using a different TCP password, an exception was thrown sometimes.
<li>Now PreparedStatement.setBigDecimal(..) can only be called with an object of </li><li>Now PreparedStatement.setBigDecimal(..) can only be called with an object of
type java.math.BigDecimal. Derived classes are not allowed any more. Many thanks to type java.math.BigDecimal. Derived classes are not allowed any more. Many thanks to
Maciej Wegorkiewicz for finding this problem. Maciej Wegorkiewicz for finding this problem.
<li>It was possible to manipulate values in the byte array after calling PreparedStatement.setBytes, </li><li>It was possible to manipulate values in the byte array after calling PreparedStatement.setBytes,
and this could lead to problems if the same byte array was used again. Now the byte array and this could lead to problems if the same byte array was used again. Now the byte array
is copied if required. is copied if required.
<li>Date, time and timestamp objects were cloned in cases where it was not required. Fixed. </li><li>Date, time and timestamp objects were cloned in cases where it was not required. Fixed.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -47,42 +74,42 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -47,42 +74,42 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(19, INSERT INTO ITEM VALUES(19,
'New version available: 1.0 / 2007-01-02', '2007-01-02 12:00:00', 'New version available: 1.0 / 2007-01-02', '2007-01-02 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>H2 is now available in Maven. The groupId is com.h2database, the <li>H2 is now available in Maven. The groupId is com.h2database, the
artifactId is h2 and the version 1.0.20061217 (the new version will be artifactId is h2 and the version 1.0.20061217 (the new version will be
available in a few days). To create the maven artifacts yourself, use available in a few days). To create the maven artifacts yourself, use
''ant mavenUploadLocal'' and ''ant mavenBuildCentral''. ''ant mavenUploadLocal'' and ''ant mavenBuildCentral''.
<li>Many settings are now initialized from system properties and can be </li><li>Many settings are now initialized from system properties and can be
changed on the command line without having recompile the database. changed on the command line without having recompile the database.
See Advances / Settings Read from System Properties. See Advances / Settings Read from System Properties.
<li>The (relative or absolute) directory where the script files are stored </li><li>The (relative or absolute) directory where the script files are stored
or read can now be changed using the system property h2.scriptDirectory or read can now be changed using the system property h2.scriptDirectory
<li>Client trace files now created in the directory ''trace.db'' and no </li><li>Client trace files now created in the directory ''trace.db'' and no
longer the application directory. This can be changed using the system longer the application directory. This can be changed using the system
property h2.clientTraceDirectory. property h2.clientTraceDirectory.
<li>Build: Now using ant-build.properties. The JDK is automatically updated </li><li>Build: Now using ant-build.properties. The JDK is automatically updated
when using ant codeswitch_... when using ant codeswitch_...
<li>Cluster: Now the server can detect if a query is read-only, and in this </li><li>Cluster: Now the server can detect if a query is read-only, and in this
case the result is only read from the first cluster node. However, there case the result is only read from the first cluster node. However, there
is currently no load balancing made to avoid problems with transactions is currently no load balancing made to avoid problems with transactions
/ locking. / locking.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>If a CLOB or BLOB was deleted in a transaction and the database crashed <li>If a CLOB or BLOB was deleted in a transaction and the database crashed
before the transaction was committed or rolled back, the object was lost if before the transaction was committed or rolled back, the object was lost if
it was large. Fixed. it was large. Fixed.
<li>Prepared statements with non-constant functions such as </li><li>Prepared statements with non-constant functions such as
CURRENT_TIMESTAMP() did not get re-evaluated if the result of the CURRENT_TIMESTAMP() did not get re-evaluated if the result of the
function changed. Fixed. function changed. Fixed.
<li>In some situations the log file got corrupt if the process was terminated </li><li>In some situations the log file got corrupt if the process was terminated
while the database was opening. while the database was opening.
<li>Using ;RECOVER=1 in the database URL threw a syntax exception. Fixed. </li><li>Using ;RECOVER=1 in the database URL threw a syntax exception. Fixed.
<li>It was possible to drop the sequence of a temporary tables with DROP </li><li>It was possible to drop the sequence of a temporary tables with DROP
ALL OBJECTS, resulting in a null pointer exception afterwards. ALL OBJECTS, resulting in a null pointer exception afterwards.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -90,41 +117,41 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -90,41 +117,41 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(18, INSERT INTO ITEM VALUES(18,
'New version available: 1.0 / 2006-12-17', '2006-12-17 12:00:00', 'New version available: 1.0 / 2006-12-17', '2006-12-17 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>Large BLOB and CLOB support for the server and the cluster mode. <li>Large BLOB and CLOB support for the server and the cluster mode.
Larger objects will temporarily be buffered on the client side. Larger objects will temporarily be buffered on the client side.
<li>Can be compiled with JDK 1.6. </li><li>Can be compiled with JDK 1.6.
However, only very few of the JDBC 4.0 features are implemented so far. However, only very few of the JDBC 4.0 features are implemented so far.
<li>Table aliases are now supported in DELETE and UPDATE. </li><li>Table aliases are now supported in DELETE and UPDATE.
Example: DELETE FROM TEST T0. Example: DELETE FROM TEST T0.
<li>The RunScript tool can now include other files using a new syntax: </li><li>The RunScript tool can now include other files using a new syntax:
@INCLUDE fileName. This is only required for server and cluster modes. @INCLUDE fileName. This is only required for server and cluster modes.
It was already possible to use embedded RUNSCRIPT statements, It was already possible to use embedded RUNSCRIPT statements,
but those are always executed locally. but those are always executed locally.
<li>When the database URL contains ;RECOVERY=TRUE then </li><li>When the database URL contains ;RECOVERY=TRUE then
the index file is now deleted if it was not closed before. the index file is now deleted if it was not closed before.
<li>Deleting old temp files now uses a phantom reference queue. </li><li>Deleting old temp files now uses a phantom reference queue.
Generally, temp files should now be deleted earlier. Generally, temp files should now be deleted earlier.
<li>Opening a large database is now much faster </li><li>Opening a large database is now much faster
even when using the default log mode (LOG=1), even when using the default log mode (LOG=1),
if the database was previously closed. if the database was previously closed.
<li>Support for indexed parameters in PreparedStatements: </li><li>Support for indexed parameters in PreparedStatements:
UPDATE TEST SET NAME = ?2 WHERE ID = ?1 UPDATE TEST SET NAME = ?2 WHERE ID = ?1
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Unfortunately, the Hibernate dialect has changed due to a change <li>Unfortunately, the Hibernate dialect has changed due to a change
in the meta data in the last release (INFORMATION_SCHEMA.SEQUENCES). in the meta data in the last release (INFORMATION_SCHEMA.SEQUENCES).
<li>String.toUpperCase and toLowerCase can not be used to parse commands. </li><li>String.toUpperCase and toLowerCase can not be used to parse commands.
Now using toUpperCase(Locale.ENGLISH) or Character.toUpperCase(..). Now using toUpperCase(Locale.ENGLISH) or Character.toUpperCase(..).
<li>The scale of a NUMERIC(1) column is now 0. It used to be 32767. </li><li>The scale of a NUMERIC(1) column is now 0. It used to be 32767.
<li>PreparedStatement.setObject(x, y, Types.OTHER) does now </li><li>PreparedStatement.setObject(x, y, Types.OTHER) does now
serialize the object in every case (even for Integer). serialize the object in every case (even for Integer).
<li>EXISTS subqueries with parameters were not re-evaluated </li><li>EXISTS subqueries with parameters were not re-evaluated
when the prepared statement was reused. This could lead to incorrect results. when the prepared statement was reused. This could lead to incorrect results.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -132,26 +159,26 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -132,26 +159,26 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(17, INSERT INTO ITEM VALUES(17,
'New version available: 1.0 / 2006-12-03', '2006-12-03 12:00:00', 'New version available: 1.0 / 2006-12-03', '2006-12-03 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>New connection time setting CACHE_TYPE=TQ to use the 2Q page replacement <li>New connection time setting CACHE_TYPE=TQ to use the 2Q page replacement
algorithm. 2Q should be more resistant to table scan. algorithm. 2Q should be more resistant to table scan.
<li>Improved performance for CREATE INDEX (about 10%). </li><li>Improved performance for CREATE INDEX (about 10%).
<li>Optimization: The left and right side of a AND and OR conditions are now </li><li>Optimization: The left and right side of a AND and OR conditions are now
ordered by the expected cost. ordered by the expected cost.
<li>Java functions returning a result set (such as CSVREAD) now can be used in </li><li>Java functions returning a result set (such as CSVREAD) now can be used in
a SELECT statement like a table. The behaviour has been changed: Now first a SELECT statement like a table. The behaviour has been changed: Now first
call contains the values if set, but the connection URL is different call contains the values if set, but the connection URL is different
(jdbc:columnlist:connection instead of jdbc:default:connection). (jdbc:columnlist:connection instead of jdbc:default:connection).
<li>The service wrapper is now included in the default installation and documented. </li><li>The service wrapper is now included in the default installation and documented.
<li>New system function SESSION_ID(). </li><li>New system function SESSION_ID().
<li>Mixing certain data types in an operation, for example VARCHAR and </li><li>Mixing certain data types in an operation, for example VARCHAR and
TIMESTAMP, now converts both expressions to TIMESTAMP. TIMESTAMP, now converts both expressions to TIMESTAMP.
<li>Change behaviour: If both sides of a comparison are parameters with unknown </li><li>Change behaviour: If both sides of a comparison are parameters with unknown
data type, then an exception is thrown now. The same happens for UNION data type, then an exception is thrown now. The same happens for UNION
SELECT if both columns are parameters. SELECT if both columns are parameters.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>There was a bug in the database encryption algorithm. <li>There was a bug in the database encryption algorithm.
...@@ -160,15 +187,15 @@ INSERT INTO ITEM VALUES(17, ...@@ -160,15 +187,15 @@ INSERT INTO ITEM VALUES(17,
using the org.h2.tools.ChangePassword (using the old database engine), and using the org.h2.tools.ChangePassword (using the old database engine), and
encrypt the database using the new engine. Alternatively, you can use the encrypt the database using the new engine. Alternatively, you can use the
Backup and RunScript tools or the SQL commands SCRIPT and RUNSCRIPT. Backup and RunScript tools or the SQL commands SCRIPT and RUNSCRIPT.
<li>Deeply nested views where slow to execute, because the query was parsed </li><li>Deeply nested views where slow to execute, because the query was parsed
many times. Fixed. many times. Fixed.
<li>The SQL statement COMMENT did not work as expected. If you already have </li><li>The SQL statement COMMENT did not work as expected. If you already have
comments in the database, it is recommended to backup and restore the comments in the database, it is recommended to backup and restore the
database, using the Backup and RunScript tools or the SQL commands SCRIPT database, using the Backup and RunScript tools or the SQL commands SCRIPT
and RUNSCRIPT. and RUNSCRIPT.
<li>Server: In some situations, calling close() on a ResultSet or Statement threw </li><li>Server: In some situations, calling close() on a ResultSet or Statement threw
an exception. This has been fixed. an exception. This has been fixed.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -176,35 +203,35 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -176,35 +203,35 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(16, INSERT INTO ITEM VALUES(16,
'New version available: 1.0 / 2006-11-20', '2006-11-20 12:00:00', 'New version available: 1.0 / 2006-11-20', '2006-11-20 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>New SQL statement SET SCHEMA to change the current schema of this session. <li>New SQL statement SET SCHEMA to change the current schema of this session.
<li>New system function SCHEMA() to get the current schema. </li><li>New system function SCHEMA() to get the current schema.
<li>SCRIPT: New option BLOCKSIZE to split BLOB and CLOB data into separate blocks, to avoid OutOfMemory problems. </li><li>SCRIPT: New option BLOCKSIZE to split BLOB and CLOB data into separate blocks, to avoid OutOfMemory problems.
<li>CURRVAL and NEXTVAL functions: New optional sequence name parameter. </li><li>CURRVAL and NEXTVAL functions: New optional sequence name parameter.
<li>The default cache size is now 65536 pages instead of 32768. </li><li>The default cache size is now 65536 pages instead of 32768.
<li>New optimization to reuse subquery results. Can be disabled with SET OPTIMIZE_REUSE_RESULTS 0. </li><li>New optimization to reuse subquery results. Can be disabled with SET OPTIMIZE_REUSE_RESULTS 0.
<li>EXPLAIN... results are now formatted on multiple lines so they are easier to read. </li><li>EXPLAIN... results are now formatted on multiple lines so they are easier to read.
<li>The Spanish translation was completed by Miguel Angel. Thanks a lot! Translations to other languages are always welcome. </li><li>The Spanish translation was completed by Miguel Angel. Thanks a lot! Translations to other languages are always welcome.
<li>The Recovery tool has been improved. It now creates a SQL script file that can be executed directly. </li><li>The Recovery tool has been improved. It now creates a SQL script file that can be executed directly.
<li>LENGTH now returns the precision for CLOB, BLOB, and BINARY (and is therefore faster). </li><li>LENGTH now returns the precision for CLOB, BLOB, and BINARY (and is therefore faster).
<li>The built-in FTP server can now access a virtual directory stored in a database. </li><li>The built-in FTP server can now access a virtual directory stored in a database.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>When using the READ_COMMITTED isolation level, a transaction now waits until there are no write locks. <li>When using the READ_COMMITTED isolation level, a transaction now waits until there are no write locks.
<li>INSERT INTO ... SELECT ... and ALTER TABLE with CLOB and/or BLOB data did not work. </li><li>INSERT INTO ... SELECT ... and ALTER TABLE with CLOB and/or BLOB data did not work.
<li>CSV tool: the methods setFieldSeparatorWrite and setRowSeparatorWrite where not accessible. </li><li>CSV tool: the methods setFieldSeparatorWrite and setRowSeparatorWrite where not accessible.
<li>ALTER TABLE ADD did throw a strange message if the table contained views. Now the message is better, </li><li>ALTER TABLE ADD did throw a strange message if the table contained views. Now the message is better,
but it is still not possible to do that if views on this table exist. but it is still not possible to do that if views on this table exist.
<li>ALTER TABLE: If there was a foreign key in another table that references to the change table, the constraint was dropped. </li><li>ALTER TABLE: If there was a foreign key in another table that references to the change table, the constraint was dropped.
<li>Direct links to the Javadoc were not working. </li><li>Direct links to the Javadoc were not working.
<li>Inserting rows into linked tables did not work for HSQLDB when the value was NULL. </li><li>Inserting rows into linked tables did not work for HSQLDB when the value was NULL.
<li>Oracle SYNONYM tables are now listed in the H2 Console. </li><li>Oracle SYNONYM tables are now listed in the H2 Console.
<li>CREATE LINKED TABLE didn''t work for Oracle SYNONYM tables. </li><li>CREATE LINKED TABLE didn''t work for Oracle SYNONYM tables.
<li>When using the server version, when not closing result sets or using nested DatabaseMetaData result sets, the connection could break. </li><li>When using the server version, when not closing result sets or using nested DatabaseMetaData result sets, the connection could break.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -212,44 +239,44 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -212,44 +239,44 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(15, INSERT INTO ITEM VALUES(15,
'New version available: 1.0 / 2006-11-03', '2006-11-03 12:00:00', 'New version available: 1.0 / 2006-11-03', '2006-11-03 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>New SQL statement COMMENT ON ... IS ... <li>New SQL statement COMMENT ON ... IS ...
<li>Two simple full text search implementations (Lucene and native) are now included. </li><li>Two simple full text search implementations (Lucene and native) are now included.
This is work in progress, and currently undocumented. This is work in progress, and currently undocumented.
See test/org/h2/samples/fullTextSearch.sql and History for more details. See test/org/h2/samples/fullTextSearch.sql and History for more details.
<li>Index names of referential constraints are now prefixed with the constraint name. </li><li>Index names of referential constraints are now prefixed with the constraint name.
<li>Improved search functionality in the HTML documentation (highlight). </li><li>Improved search functionality in the HTML documentation (highlight).
<li>Triggers can now be defined on a list of actions. </li><li>Triggers can now be defined on a list of actions.
<li>On some systems (for example, some Linux VFAT and USB flash disk drivers), </li><li>On some systems (for example, some Linux VFAT and USB flash disk drivers),
RandomAccessFile.setLength does not work correctly. RandomAccessFile.setLength does not work correctly.
A workaround for this problem has been implemented. A workaround for this problem has been implemented.
<li>DatabaseMetaData.getTableTypes now also returns SYSTEM TABLE and TABLE VIEW. </li><li>DatabaseMetaData.getTableTypes now also returns SYSTEM TABLE and TABLE VIEW.
Please tell me if this breaks other applications or tools. Please tell me if this breaks other applications or tools.
<li>Java functions with Blob or Clob parameters are now supported. </li><li>Java functions with Blob or Clob parameters are now supported.
<li>Added a ''remarks'' column to most system tables. </li><li>Added a ''remarks'' column to most system tables.
<li>New system table INFORMATION_SCHEMA.TRIGGERS </li><li>New system table INFORMATION_SCHEMA.TRIGGERS
<li>PostgreSQL compatibility: Support for the date format 2006-09-22T13:18:17.061 </li><li>PostgreSQL compatibility: Support for the date format 2006-09-22T13:18:17.061
<li>MySQL compatibility: ResultSet.getString("PEOPLE.NAME") is now supported. </li><li>MySQL compatibility: ResultSet.getString("PEOPLE.NAME") is now supported.
<li>JDBC 4.0 driver auto discovery: When using JDK 1.6, </li><li>JDBC 4.0 driver auto discovery: When using JDK 1.6,
Class.forName("org.h2.Driver") is no longer required. Class.forName("org.h2.Driver") is no longer required.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Wide b-tree indexes (with large VARCHAR columns for example) could get corrupted. <li>Wide b-tree indexes (with large VARCHAR columns for example) could get corrupted.
<li>If a custom shutdown hook was installed, and the database was called at shutdown, </li><li>If a custom shutdown hook was installed, and the database was called at shutdown,
a NullPointException was thrown. a NullPointException was thrown.
Now, a error message with instructions how to fix this is thrown. Now, a error message with instructions how to fix this is thrown.
<li>If SHUTDOWN was called and DB_CLOSE_DELAY was set, the database was not closed. </li><li>If SHUTDOWN was called and DB_CLOSE_DELAY was set, the database was not closed.
<li>Subqueries with order by outside the column list didn''t work correctly. </li><li>Subqueries with order by outside the column list didn''t work correctly.
<li>Linked Tables: Only the first column was linked when linking to PostgreSQL. </li><li>Linked Tables: Only the first column was linked when linking to PostgreSQL.
<li>Sequences: When the database is not closed normally, the value was not set correctly. </li><li>Sequences: When the database is not closed normally, the value was not set correctly.
<li>The optimization for IN(SELECT...) was too aggressive. </li><li>The optimization for IN(SELECT...) was too aggressive.
<li>Blob.getBytes skipped the wrong number of bytes. </li><li>Blob.getBytes skipped the wrong number of bytes.
<li>Group by a function didn''t work if a column alias was specified in the select list. </li><li>Group by a function didn''t work if a column alias was specified in the select list.
<li>LOCK_MODE 0 (READ_UNCOMMITTED) did not work when using multiple connections. </li><li>LOCK_MODE 0 (READ_UNCOMMITTED) did not work when using multiple connections.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -257,25 +284,25 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -257,25 +284,25 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(14, INSERT INTO ITEM VALUES(14,
'New version available: 1.0 / 2006-10-10', '2006-10-10 12:00:00', 'New version available: 1.0 / 2006-10-10', '2006-10-10 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>Support for DOMAIN (user defined data types). <li>Support for DOMAIN (user defined data types).
<li>Support for UUID. </li><li>Support for UUID.
<li>Function aliases may now optionally include parameter classes. </li><li>Function aliases may now optionally include parameter classes.
<li>A small FTP server is now included (disabled by default). </li><li>A small FTP server is now included (disabled by default).
<li>Can now compile everything with JDK 1.6 (however, only very few of the JDBC 4.0 features are implemented currently). </li><li>Can now compile everything with JDK 1.6 (however, only very few of the JDBC 4.0 features are implemented currently).
<li>The multi-threaded kernel can not be enabled using SET MULTI_THREADED 1. </li><li>The multi-threaded kernel can not be enabled using SET MULTI_THREADED 1.
A new tests has been written for this feature, and additional synchronization has been added. A new tests has been written for this feature, and additional synchronization has been added.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Could not re-connect to a database when ALLOW_LITERALS or COMPRESS_LOB was set. <li>Could not re-connect to a database when ALLOW_LITERALS or COMPRESS_LOB was set.
<li>Opening and closing connections in many threads sometimes failed. </li><li>Opening and closing connections in many threads sometimes failed.
<li>Reconnect didn''t work after renaming a user if rights were granted for this user. </li><li>Reconnect didn''t work after renaming a user if rights were granted for this user.
<li>GROUP BY an formula or function didn''t work if the same expression was used in the select list. </li><li>GROUP BY an formula or function didn''t work if the same expression was used in the select list.
<li>Redundant () in a IN subquery is now supported: where id in ((select id from test)). </li><li>Redundant () in a IN subquery is now supported: where id in ((select id from test)).
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -283,41 +310,41 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -283,41 +310,41 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(13, INSERT INTO ITEM VALUES(13,
'New version available: 1.0 / 2006-09-24', '2006-09-24 12:00:00', 'New version available: 1.0 / 2006-09-24', '2006-09-24 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>Protection against SQL injection: New command SET ALLOW_LITERALS {NONE|ALL|NUMBERS}. <li>Protection against SQL injection: New command SET ALLOW_LITERALS {NONE|ALL|NUMBERS}.
With SET ALLOW_LITERALS NONE, SQL injections are not possible because literals in SQL statements are rejected; With SET ALLOW_LITERALS NONE, SQL injections are not possible because literals in SQL statements are rejected;
User input must be set using parameters (''?'') in this case. User input must be set using parameters (''?'') in this case.
<li>New concept ''Constants'': New SQL statements CREATE CONSTANT and DROP CONSTANT. </li><li>New concept ''Constants'': New SQL statements CREATE CONSTANT and DROP CONSTANT.
<li>CREATE TABLE ... AS SELECT ... is now supported. </li><li>CREATE TABLE ... AS SELECT ... is now supported.
<li>New data type OTHER (alternative names OBJECT and JAVA_OBJECT). When using this data type, </li><li>New data type OTHER (alternative names OBJECT and JAVA_OBJECT). When using this data type,
Java Objects are automatically serialized and deserialized in the JDBC layer. Java Objects are automatically serialized and deserialized in the JDBC layer.
<li>Improved performance for MetaData calls </li><li>Improved performance for MetaData calls
<li>Improved BatchUpdateException </li><li>Improved BatchUpdateException
<li>DatabaseMetaData.getProcedures and getProcedureColumns are implemented now </li><li>DatabaseMetaData.getProcedures and getProcedureColumns are implemented now
<li>An exception is now thrown on unknown setting in the database URL (which are most likely typos) </li><li>An exception is now thrown on unknown setting in the database URL (which are most likely typos)
<li>The log size is now automatically increased to at least 10% of the data file. </li><li>The log size is now automatically increased to at least 10% of the data file.
<li>Backup and Runscript tools now support options (for compression and so on) </li><li>Backup and Runscript tools now support options (for compression and so on)
<li>InetAddress.getByName("127.0.0.1") instead of InetAddress.getLocalHost() is now used to get the loopback address </li><li>InetAddress.getByName("127.0.0.1") instead of InetAddress.getLocalHost() is now used to get the loopback address
<li>CREATE SCHEMA: The authorization part is now optional. </li><li>CREATE SCHEMA: The authorization part is now optional.
<li>DROP TABLE: Can now drop more than one column in one step: DROP TABLE A, B </li><li>DROP TABLE: Can now drop more than one column in one step: DROP TABLE A, B
<li>LOBs are now automatically converted to files by default. </li><li>LOBs are now automatically converted to files by default.
<li> Optimizations for WHERE ... IN(...) and SELECT MIN(..), MAX(..) are now enabled by default. </li><li> Optimizations for WHERE ... IN(...) and SELECT MIN(..), MAX(..) are now enabled by default.
<li>New system function LOCK_MODE() </li><li>New system function LOCK_MODE()
<li>Connection.setTransactionIsolation and getTransactionIsolation now set / get the LOCK_MODE of the database. </li><li>Connection.setTransactionIsolation and getTransactionIsolation now set / get the LOCK_MODE of the database.
<li>New LOCK_MODE 3 (READ_COMMITTED). Table level locking, but only when writing (no read locks). </li><li>New LOCK_MODE 3 (READ_COMMITTED). Table level locking, but only when writing (no read locks).
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Wide b-tree indexes (with large VARCHAR columns for example) with a long common prefix (where many <li>Wide b-tree indexes (with large VARCHAR columns for example) with a long common prefix (where many
rows start with the same text) could get corrupted. Fixed. rows start with the same text) could get corrupted. Fixed.
<li>Reading from compressed LOBs didn''t work in some cases. Fixed. </li><li>Reading from compressed LOBs didn''t work in some cases. Fixed.
<li>CLOB / BLOB: Copying LOB data directly from one table to another, and altering a table with with LOBs did not work, </li><li>CLOB / BLOB: Copying LOB data directly from one table to another, and altering a table with with LOBs did not work,
the BLOB data was deleted when the old table was deleted. Fixed. the BLOB data was deleted when the old table was deleted. Fixed.
<li>[NOT] EXISTS(SELECT ... EXCEPT SELECT ...) did not work in all cases. Fixed. </li><li>[NOT] EXISTS(SELECT ... EXCEPT SELECT ...) did not work in all cases. Fixed.
<li>Functions returning a result set are now called as documented. </li><li>Functions returning a result set are now called as documented.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -325,29 +352,29 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -325,29 +352,29 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(12, INSERT INTO ITEM VALUES(12,
'New version available: 1.0 / 2006-09-10', '2006-09-10 12:00:00', 'New version available: 1.0 / 2006-09-10', '2006-09-10 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>SET IGNORECASE is now supported for compatibility with HSQLDB. <li>SET IGNORECASE is now supported for compatibility with HSQLDB.
<li>New SQL statement DROP ALL OBJECTS [DELETE FILES] to drop all tables, sequences and so on. </li><li>New SQL statement DROP ALL OBJECTS [DELETE FILES] to drop all tables, sequences and so on.
<li>Improved OpenOffice compatibility. </li><li>Improved OpenOffice compatibility.
<li>New setting SET COMPRESS_LOB {NO|LZF|DEFLATE} to automatically compress BLOB and CLOB data. </li><li>New setting SET COMPRESS_LOB {NO|LZF|DEFLATE} to automatically compress BLOB and CLOB data.
<li>The script can now be compressed. Syntax: SCRIPT TO ''file'' COMPRESSION {DEFLATE|LZF|ZIP|GZIP}. </li><li>The script can now be compressed. Syntax: SCRIPT TO ''file'' COMPRESSION {DEFLATE|LZF|ZIP|GZIP}.
<li>Now an exception is thrown when the an overflow occurs for mathematical operations (sum, multiply and so on) for the data type selected. </li><li>Now an exception is thrown when the an overflow occurs for mathematical operations (sum, multiply and so on) for the data type selected.
This was implemented in the previous version but is now enabled by default. This was implemented in the previous version but is now enabled by default.
<li>Updated the performance test so that Firebird can be tested as well. Results are not included currently, </li><li>Updated the performance test so that Firebird can be tested as well. Results are not included currently,
information how to best test Firebird should be sent to the support address or posted in the Forum. information how to best test Firebird should be sent to the support address or posted in the Forum.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>ORDER BY an expression didn''t work when using GROUP BY at the same time. <li>ORDER BY an expression didn''t work when using GROUP BY at the same time.
<li>A problem with referential constraints in the SCRIPT file has been fixed. </li><li>A problem with referential constraints in the SCRIPT file has been fixed.
<li>Console: The setting ;hsqldb.default_table_type=cached was added to the H2 database instead of the HSQLDB database. </li><li>Console: The setting ;hsqldb.default_table_type=cached was added to the H2 database instead of the HSQLDB database.
<li>Docs: The cross references in the SQL grammar docs where broken in the last release. </li><li>Docs: The cross references in the SQL grammar docs where broken in the last release.
<li>Deleting many rows from a table with a self-referencing constraint with ''on delete cascade'' did not work. </li><li>Deleting many rows from a table with a self-referencing constraint with ''on delete cascade'' did not work.
<li>ROWNUM didn''t always work as expected when using subqueries. </li><li>ROWNUM didn''t always work as expected when using subqueries.
<li>Correlated subqueries: It is now possible to use columns of the outer query in the select list of the inner query. </li><li>Correlated subqueries: It is now possible to use columns of the outer query in the select list of the inner query.
</ul> </li></ul>
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
</ul> </ul>
'); ');
...@@ -361,12 +388,12 @@ See <a href="http://www.infoq.com/news/h2-released">http://www.infoq.com/news/h2 ...@@ -361,12 +388,12 @@ See <a href="http://www.infoq.com/news/h2-released">http://www.infoq.com/news/h2
INSERT INTO ITEM VALUES(10, INSERT INTO ITEM VALUES(10,
'New version available: 1.0 / 2006-08-31', '2006-08-31 12:00:00', 'New version available: 1.0 / 2006-08-31', '2006-08-31 12:00:00',
'H2 version 1.0 is available for <a href="http://www.h2database.com">download</a>. 'H2 version 1.0 is available for <a href="http://www.h2database.com">download</a>.
<br> <br />
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>In some situations, wide b-tree indexes (with large VARCHAR columns for example) could get corrupted. Fixed. <li>In some situations, wide b-tree indexes (with large VARCHAR columns for example) could get corrupted. Fixed.
<li>ORDER BY was broken in the last release when using table aliases. Fixed. </li><li>ORDER BY was broken in the last release when using table aliases. Fixed.
</ul> </li></ul>
For details see also the history. For details see also the history.
For future plans, see the new ''Roadmap'' page on the web site. For future plans, see the new ''Roadmap'' page on the web site.
'); ');
...@@ -374,35 +401,35 @@ For future plans, see the new ''Roadmap'' page on the web site. ...@@ -374,35 +401,35 @@ For future plans, see the new ''Roadmap'' page on the web site.
INSERT INTO ITEM VALUES(9, INSERT INTO ITEM VALUES(9,
'New version available: 1.0 RC 2 / 2006-08-28', '2006-08-28 12:00:00', 'New version available: 1.0 RC 2 / 2006-08-28', '2006-08-28 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>Linked tables: The table name is no longer quoted when accessing the foreign database. <li>Linked tables: The table name is no longer quoted when accessing the foreign database.
This allows to use schema names, and possibly subqueries as table names (when used in queries). This allows to use schema names, and possibly subqueries as table names (when used in queries).
Also, the compatibility with other databases has been improved. Also, the compatibility with other databases has been improved.
<li>New setting MAX_LENGTH_INPLACE_LOB. </li><li>New setting MAX_LENGTH_INPLACE_LOB.
<li>LOB files where not deleted when the table was truncated or dropped. This is now done. </li><li>LOB files where not deleted when the table was truncated or dropped. This is now done.
</ul> </li></ul>
<b>New Functionality (but currently disabled):</b> <b>New Functionality (but currently disabled):</b>
These features are currently disabled. They will be enabled after release 1.0. These features are currently disabled. They will be enabled after release 1.0.
See the history for more details. See the history for more details.
<li>Optimization for MIN and MAX: Queries such as SELECT MIN(ID), MAX(ID)+1, COUNT(*) FROM TEST can now use an index if one is available. <li>Optimization for MIN and MAX: Queries such as SELECT MIN(ID), MAX(ID)+1, COUNT(*) FROM TEST can now use an index if one is available.
<li>When large strings or byte arrays where inserted into a LOB (CLOB or BLOB), or if the data was stored using </li><li>When large strings or byte arrays where inserted into a LOB (CLOB or BLOB), or if the data was stored using
PreparedStatement.setBytes or setString, the data was stored in-place (no separate files where created). PreparedStatement.setBytes or setString, the data was stored in-place (no separate files where created).
Now distinct files are created if the size is larger than MAX_LENGTH_INPLACE_LOB. Now distinct files are created if the size is larger than MAX_LENGTH_INPLACE_LOB.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Outer join: Some incompatibilities with PostgreSQL and MySQL with more complex outer joins have been fixed. <li>Outer join: Some incompatibilities with PostgreSQL and MySQL with more complex outer joins have been fixed.
<li>Subquery optimization: Constant subqueries are now only evaluated once (like this was before). </li><li>Subquery optimization: Constant subqueries are now only evaluated once (like this was before).
<li>DATEDIFF on seconds, minutes, hours did return different results in certain timezones (half-hour timezones) in certain situations. Fixed. </li><li>DATEDIFF on seconds, minutes, hours did return different results in certain timezones (half-hour timezones) in certain situations. Fixed.
</ul> </li></ul>
For details see also the history. Version 1.0 is planned for 2006-08-29. For details see also the history. Version 1.0 is planned for 2006-08-29.
The plans for version 1.0 are: The plans for version 1.0 are:
<ul> <ul>
<li>Write more tests, bugfixes. <li>Write more tests, bugfixes.
<li>For plans after release 1.0, see the new ''Roadmap'' page on the web site. </li><li>For plans after release 1.0, see the new ''Roadmap'' page on the web site.
</ul> </li></ul>
'); ');
INSERT INTO ITEM VALUES(8, INSERT INTO ITEM VALUES(8,
...@@ -415,41 +442,41 @@ This is still open for discussion at the <a href="http://www.h2database.com/ipow ...@@ -415,41 +442,41 @@ This is still open for discussion at the <a href="http://www.h2database.com/ipow
INSERT INTO ITEM VALUES(7, INSERT INTO ITEM VALUES(7,
'New version available: 0.9 RC 1 / 2006-08-23', '2006-08-23 12:00:00', 'New version available: 0.9 RC 1 / 2006-08-23', '2006-08-23 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>Date and time constants outside the valid range (February 31 and so on) are no longer accepted. <li>Date and time constants outside the valid range (February 31 and so on) are no longer accepted.
<li>Improvements in the autocomplete feature. Thanks a lot to James Devenish for his very valuable feedback and testing! </li><li>Improvements in the autocomplete feature. Thanks a lot to James Devenish for his very valuable feedback and testing!
</ul> </li></ul>
<b>New Functionality (but currently disabled):</b> <b>New Functionality (but currently disabled):</b>
These features are currently disabled. They will be enabled after release 1.0. These features are currently disabled. They will be enabled after release 1.0.
See the history for more details. See the history for more details.
<li>Optimization for IN(value list) and IN(subquery). <li>Optimization for IN(value list) and IN(subquery).
<li>Very large transactions are now supported. </li><li>Very large transactions are now supported.
<li>Arithmetic overflows in can now be detected for integer types. </li><li>Arithmetic overflows in can now be detected for integer types.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Bugfix for an outer join problem (too many rows where returned for a combined inner join / outer join). <li>Bugfix for an outer join problem (too many rows where returned for a combined inner join / outer join).
<li>Local temporary tables where not included in the meta data. </li><li>Local temporary tables where not included in the meta data.
<li>Database opening: Sometimes opening a database was very slow because indexes were re-created. </li><li>Database opening: Sometimes opening a database was very slow because indexes were re-created.
<li>Referential integrity: Fixed a stack overflow problem when using cascade delete. </li><li>Referential integrity: Fixed a stack overflow problem when using cascade delete.
<li>LIKE: If collation was set (SET COLLATION ...), it was ignored when using LIKE. </li><li>LIKE: If collation was set (SET COLLATION ...), it was ignored when using LIKE.
</ul> </li></ul>
For details see also the history. Release 1.0 is planned for 2006-08-28. For details see also the history. Release 1.0 is planned for 2006-08-28.
There will be another release candidate (RC 2) before. There will be another release candidate (RC 2) before.
The plans for the next release (RC 2) are: The plans for the next release (RC 2) are:
<ul> <ul>
<li>Change the license to MPL. <li>Change the license to MPL.
<li>Write more tests, bugfixes. </li><li>Write more tests, bugfixes.
<li>For plans after release 1.0, see the new ''Roadmap'' page on the web site. </li><li>For plans after release 1.0, see the new ''Roadmap'' page on the web site.
</ul> </li></ul>
'); ');
INSERT INTO ITEM VALUES(6, INSERT INTO ITEM VALUES(6,
'New version available: 0.9 Beta / 2006-08-14', '2006-08-14 12:00:00', 'New version available: 0.9 Beta / 2006-08-14', '2006-08-14 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>Autocomplete support in the H2 Console. <li>Autocomplete support in the H2 Console.
...@@ -457,139 +484,104 @@ INSERT INTO ITEM VALUES(6, ...@@ -457,139 +484,104 @@ INSERT INTO ITEM VALUES(6,
Schemas and quoted identifiers are not yet supported. Schemas and quoted identifiers are not yet supported.
There are some browser issues, but everything should work in Firefox. There are some browser issues, but everything should work in Firefox.
Please report any incompatibilities, problems and usability issues. Please report any incompatibilities, problems and usability issues.
<li>Source code to support H2 in Resin is included. </li><li>Source code to support H2 in Resin is included.
For the complete patch, see http://forum.caucho.com/node/61 For the complete patch, see http://forum.caucho.com/node/61
<li>Space is better re-used after deleting many records. </li><li>Space is better re-used after deleting many records.
<li>Umlauts and chinese characters are now supported in identifier names. </li><li>Umlauts and chinese characters are now supported in identifier names.
<li>Performance optimization for outer join with comparison with constants in the where clause. </li><li>Performance optimization for outer join with comparison with constants in the where clause.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>SET LOG 0 didn''t work. Fixed. <li>SET LOG 0 didn''t work. Fixed.
<li>Fixed a problem when comparing BIGINT values with constants. </li><li>Fixed a problem when comparing BIGINT values with constants.
<li>Fixed NULL handling where there is a NULL value in the list. </li><li>Fixed NULL handling where there is a NULL value in the list.
<li>It is now possible to cancel a select statement with a (temporary) view. </li><li>It is now possible to cancel a select statement with a (temporary) view.
</ul> </li></ul>
For details see also the history. The next release is planned for 2006-08-28. For details see also the history. The next release is planned for 2006-08-28.
If everything goes fine this will be 1.0 final (there might be a release candidate or two before this date). If everything goes fine this will be 1.0 final (there might be a release candidate or two before this date).
The plans for the next release are: The plans for the next release are:
<ul> <ul>
<li>Bugfixes, write more tests, more bugfixes, more tests. <li>Bugfixes, write more tests, more bugfixes, more tests.
<li>Proposal for changed license. </li><li>Proposal for changed license.
<li>For other plans, see the new ''Roadmap'' part on the web site. </li><li>For other plans, see the new ''Roadmap'' part on the web site.
</ul> </li></ul>
'); ');
INSERT INTO ITEM VALUES(5, INSERT INTO ITEM VALUES(5,
'New version available: 0.9 Beta / 2006-07-29', '2006-07-30 12:00:00', 'New version available: 0.9 Beta / 2006-07-29', '2006-07-30 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>ParameterMetaData is now implemented <li>ParameterMetaData is now implemented
<li>Experimental auto-complete functionality in the H2 Console. </li><li>Experimental auto-complete functionality in the H2 Console.
Does not yet work for all cases. Does not yet work for all cases.
Press [Ctrl]+[Space] to activate, and [Esc] to deactivate it. Press [Ctrl]+[Space] to activate, and [Esc] to deactivate it.
<li>1.0/3.0 is now 0.33333... and not 0.3 as before. </li><li>1.0/3.0 is now 0.33333... and not 0.3 as before.
The scale of a DECIMAL division is adjusted automatically (up to current scale + 25). The scale of a DECIMAL division is adjusted automatically (up to current scale + 25).
<li>''SELECT * FROM TEST'' can now be written as ''FROM TEST SELECT *'' </li><li>''SELECT * FROM TEST'' can now be written as ''FROM TEST SELECT *''
<li>New parameter schemaName in Trigger.init. </li><li>New parameter schemaName in Trigger.init.
<li>New method DatabaseEventListener.init to pass the database URL. </li><li>New method DatabaseEventListener.init to pass the database URL.
<li> Opening a database that was not closed previously is now faster </li><li> Opening a database that was not closed previously is now faster
(specially if using a database URL of the form jdbc:h2:test;LOG=2) (specially if using a database URL of the form jdbc:h2:test;LOG=2)
<li>Improved performance for Statement.getGeneratedKeys </li><li>Improved performance for Statement.getGeneratedKeys
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>SCRIPT: The system generated indexes are not any more included in the script file. <li>SCRIPT: The system generated indexes are not any more included in the script file.
Also, the drop statements for generated sequences are not included in the script any longer. Also, the drop statements for generated sequences are not included in the script any longer.
<li>Bugfix: IN(NULL) didn''t return NULL in every case. Fixed. </li><li>Bugfix: IN(NULL) didn''t return NULL in every case. Fixed.
<li>Bugfix: DATEDIFF didn''t work correctly for hour, minute and second if one of the dates was before 1970. </li><li>Bugfix: DATEDIFF didn''t work correctly for hour, minute and second if one of the dates was before 1970.
<li>SELECT EXCEPT (or MINUS) did not work for some cases. Fixed. </li><li>SELECT EXCEPT (or MINUS) did not work for some cases. Fixed.
<li>DATEDIFF now returns a BIGINT and not an INT </li><li>DATEDIFF now returns a BIGINT and not an INT
<li>DATEADD didn''t work for milliseconds. </li><li>DATEADD didn''t work for milliseconds.
<li>Could not connect to a database that was closing at the same time. </li><li>Could not connect to a database that was closing at the same time.
<li>C-style block comments /* */ are not parsed correctly when they contain * or / </li><li>C-style block comments /* */ are not parsed correctly when they contain * or /
</ul> </li></ul>
For details see also the history. The plans for the next release are: For details see also the history. The plans for the next release are:
<ul> <ul>
<li>Bugfixes, write more tests, more bugfixes, more tests. <li>Bugfixes, write more tests, more bugfixes, more tests.
<li>Proposal for changed license. </li><li>Proposal for changed license.
<li>For other plans, see the new ''Roadmap'' part on the web site. </li><li>For other plans, see the new ''Roadmap'' part on the web site.
</ul> </li></ul>
'); ');
INSERT INTO ITEM VALUES(4, INSERT INTO ITEM VALUES(4,
'New version available: 0.9 Beta / 2006-07-14', '2006-07-14 12:00:00', 'New version available: 0.9 Beta / 2006-07-14', '2006-07-14 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>.
<br> <br />
<b>Changes and new functionality:</b> <b>Changes and new functionality:</b>
<ul> <ul>
<li>The cache size is now measured in blocks and no longer in rows. <li>The cache size is now measured in blocks and no longer in rows.
Manually setting the cache size is no longer necessary in most cases. Manually setting the cache size is no longer necessary in most cases.
<li>CREATE VIEW now supports a column list: CREATE VIEW TEST_V(A, B) AS ... </li><li>CREATE VIEW now supports a column list: CREATE VIEW TEST_V(A, B) AS ...
<li>New column IS_GENERATED in the metadata tables SEQUENCES and INDEXES. </li><li>New column IS_GENERATED in the metadata tables SEQUENCES and INDEXES.
<li>ResultSetMetaData.isNullable is now implemented. </li><li>ResultSetMetaData.isNullable is now implemented.
<li>Optimization: data conversion of constants was not optimized. </li><li>Optimization: data conversion of constants was not optimized.
<li>Optimization: deterministic subqueries are evaluated only once. </li><li>Optimization: deterministic subqueries are evaluated only once.
<li>Compatibility: ''T'', ''Y'', ''YES'', ''F'', ''N'', ''NO'' (case insensitive) can now also be converted to boolean. </li><li>Compatibility: ''T'', ''Y'', ''YES'', ''F'', ''N'', ''NO'' (case insensitive) can now also be converted to boolean.
<li>Compatibility: SUBSTRING(string FROM start FOR length). </li><li>Compatibility: SUBSTRING(string FROM start FOR length).
<li>Compatibility: TRIM(whitespace FROM string). </li><li>Compatibility: TRIM(whitespace FROM string).
<li>LIKE ... ESCAPE: The escape character may now also be an expression. </li><li>LIKE ... ESCAPE: The escape character may now also be an expression.
<li>IF EXISTS / IF NOT EXISTS implemented for the remaining CREATE / DROP statements. </li><li>IF EXISTS / IF NOT EXISTS implemented for the remaining CREATE / DROP statements.
<li>An exception was thrown if a scalar subquery returned no rows. Now NULL is returned. </li><li>An exception was thrown if a scalar subquery returned no rows. Now NULL is returned.
<li>Objects of unknown type are no longer serialized to a byte array. </li><li>Objects of unknown type are no longer serialized to a byte array.
<li>Reduced jar file size: The regression tests are no longer included in the jar file. </li><li>Reduced jar file size: The regression tests are no longer included in the jar file.
</ul> </li></ul>
<b>Bugfixes:</b> <b>Bugfixes:</b>
<ul> <ul>
<li>Issue #123: The connection to the server is lost if an abnormal exception occurs. <li>Issue #123: The connection to the server is lost if an abnormal exception occurs.
<li>Issue #124: Adding a column didn''t work when the table contains a referential integrity check. </li><li>Issue #124: Adding a column didn''t work when the table contains a referential integrity check.
<li>Issue #125: Foreign key constraints of local temporary tables are not dropped when the table is dropped. </li><li>Issue #125: Foreign key constraints of local temporary tables are not dropped when the table is dropped.
<li>Issue #126: It is possible to create multiple primary keys for the same table. </li><li>Issue #126: It is possible to create multiple primary keys for the same table.
<li>A few bugs in the CSV tool have been fixed. </li><li>A few bugs in the CSV tool have been fixed.
</ul> </li></ul>
For details see also the history. The plans for the next release are: For details see also the history. The plans for the next release are:
<ul> <ul>
<li>Bugfixes, write more tests, more bugfixes, more tests. <li>Bugfixes, write more tests, more bugfixes, more tests.
<li>Proposal for changed license. </li><li>Proposal for changed license.
<li>For other plans, see the new ''Roadmap'' part on the web site. </li><li>For other plans, see the new ''Roadmap'' part on the web site.
</ul> </li></ul>
');
INSERT INTO ITEM VALUES(3,
'New version available: 0.9 Beta / 2006-07-01', '2006-07-01 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
<br>
<b>Changes and new functionality:</b>
<ul>
<li>Reduced memory usage: implemented a String cache and improved the Value cache.
Now uses a weak reference to avoid OutOfMemory.
(however the row cache could still cause OutOfMemory).
<li>New functions: MEMORY_FREE() and MEMORY_USED().
<li>Newsfeed sample application (used to create the newsfeed and newsletter).
<li>Server: changed the public API to allow an application to deal easier with start problems.
</ul>
<b>Bugfixes:</b>
<ul>
<li>Issue #116: Server: reduces memory usage. Reduced number of cached objects per connection.
<li>Issue #117: Server.start...Server sometimes returned before the server was started. Solved.
<li>Issue #118: ALTER TABLE RENAME COLUMN didn''t work correctly.
<li>Issue #119: If a table with autoincrement column is created in another schema,
it was not possible to connect to the database again.
<li>Issue #120: Some ALTER TABLE statements didn''t work when the table was in another than the main schema. Fixed.
<li>Issue #121: Using a quoted table or alias name in front of a column name (SELECT "TEST".ID FROM TEST) didn''t work.
<li>Database names are no longer case sensitive for the Windows operating system,
because there the files names are not case sensitive.
<li>Issue #122: Using OFFSET in big result sets (disk buffered result sets) did not work. Fixed.
<li>Outer joins did not always use an index even if this was possible.
</ul>
For details see also the history. The plans for the next release are:
<ul>
<li>Bugfixes, write more tests, more bugfixes, more tests
<li>Proposal for changed license (still pending...)
<li>For other plans, see the new ''Roadmap'' part on the web site
</ul>
'); ');
SELECT 'newsfeed-rss.xml' FILE, SELECT 'newsfeed-rss.xml' FILE,
......
...@@ -86,6 +86,31 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2 ...@@ -86,6 +86,31 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
TestAll test = new TestAll(); TestAll test = new TestAll();
test.printSystem(); test.printSystem();
// improve TestHalt
// TODO backup : lobs are not backed up
// DROP TABLE IF EXISTS TEST;
// CREATE TABLE TEST(ID INT PRIMARY KEY, DATA CLOB);
// INSERT INTO TEST VALUES(1, space(10000));
// INSERT INTO TEST VALUES(2, 'World');
// drop table bar;
// drop table foo;
// create table FOO(id integer primary key);
// create table BAR(fooId integer);
// alter table bar add foreign key (fooid) references foo (id);
// truncate table bar;
// drop table FOO;
// create table FOO (ID int, A number(18, 2));
// insert into FOO (ID, A) values (1, 10.0), (2, 20.0);
// select SUM (CASE when ID=1 then 0 ELSE A END) col0 from Foo;
// hot backup: test, test encrypted database
// BACKUP: compare sql syntax with other databases
// Hot backup (incremental backup, online backup): backup data, log, index? files
// h2 // h2
// update FOO set a = dateadd('second', 4320000, a); // update FOO set a = dateadd('second', 4320000, a);
// ms sql server // ms sql server
...@@ -100,11 +125,6 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2 ...@@ -100,11 +125,6 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
// test backup // test backup
// backup: lobs, index // backup: lobs, index
// improve TestHalt
// BACKUP: compare sql syntax with other databases
// Hot backup (incremental backup, online backup): backup data, log, index? files
// GroovyServlet // GroovyServlet
// Cluster: hot deploy (adding a node on runtime) // Cluster: hot deploy (adding a node on runtime)
......
...@@ -11,6 +11,7 @@ import java.sql.Connection; ...@@ -11,6 +11,7 @@ import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.ResultSetMetaData; import java.sql.ResultSetMetaData;
import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
...@@ -82,8 +83,10 @@ public class GenerateDoc { ...@@ -82,8 +83,10 @@ public class GenerateDoc {
void map(String key, String sql) throws Exception { void map(String key, String sql) throws Exception {
ResultSet rs = null; ResultSet rs = null;
Statement stat = null;
try { try {
rs = conn.createStatement().executeQuery(sql); stat = conn.createStatement();
rs = stat.executeQuery(sql);
ArrayList list = new ArrayList(); ArrayList list = new ArrayList();
while(rs.next()) { while(rs.next()) {
HashMap map = new HashMap(); HashMap map = new HashMap();
...@@ -96,7 +99,7 @@ public class GenerateDoc { ...@@ -96,7 +99,7 @@ public class GenerateDoc {
String topic = rs.getString("TOPIC"); String topic = rs.getString("TOPIC");
String syntax = rs.getString("SYNTAX"); String syntax = rs.getString("SYNTAX");
syntax = PageParser.escapeHtml(syntax); syntax = PageParser.escapeHtml(syntax);
syntax = StringUtils.replaceAll(syntax, "<br>", ""); syntax = StringUtils.replaceAll(syntax, "<br />", "");
syntax = bnf.getSyntax(topic, syntax); syntax = bnf.getSyntax(topic, syntax);
map.put("syntax", syntax); map.put("syntax", syntax);
list.add(map); list.add(map);
...@@ -104,6 +107,7 @@ public class GenerateDoc { ...@@ -104,6 +107,7 @@ public class GenerateDoc {
session.put(key, list); session.put(key, list);
} finally { } finally {
JdbcUtils.closeSilently(rs); JdbcUtils.closeSilently(rs);
JdbcUtils.closeSilently(stat);
} }
} }
} }
...@@ -47,9 +47,9 @@ public class MergeDocs { ...@@ -47,9 +47,9 @@ public class MergeDocs {
String finalText= buff.toString(); String finalText= buff.toString();
File output = new File(baseDir, "onePage.html"); File output = new File(baseDir, "onePage.html");
PrintWriter writer = new PrintWriter(new FileWriter(output)); PrintWriter writer = new PrintWriter(new FileWriter(output));
writer.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"><title>"); writer.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /><title>");
writer.println("H2 Documentation"); writer.println("H2 Documentation");
writer.println("</title><link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheetPdf.css\"></head><body>"); writer.println("</title><link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheetPdf.css\" /></head><body>");
writer.println(finalText); writer.println(finalText);
writer.println("</body></html>"); writer.println("</body></html>");
writer.close(); writer.close();
......
...@@ -89,9 +89,9 @@ public class XMLChecker { ...@@ -89,9 +89,9 @@ public class XMLChecker {
private static void checkXML(String xml, boolean html) throws Exception { private static void checkXML(String xml, boolean html) throws Exception {
String lastElement = null; String lastElement = null;
String[] noClose = new String[]{ // <li>: replace <li>([^\r]*[^<]*) with <li>$1</li>
"li", "link", "meta", "br", "img", "input", "hr", "frame" // use this for html file, for example if <li> is not closed
}; String[] noClose = new String[]{};
XMLParser parser = new XMLParser(xml); XMLParser parser = new XMLParser(xml);
Stack stack = new Stack(); Stack stack = new Stack();
boolean rootElement = false; boolean rootElement = false;
......
...@@ -55,13 +55,13 @@ public class Doclet { ...@@ -55,13 +55,13 @@ public class Doclet {
FileWriter out = new FileWriter(fileName); FileWriter out = new FileWriter(fileName);
PrintWriter writer = new PrintWriter(new BufferedWriter(out)); PrintWriter writer = new PrintWriter(new BufferedWriter(out));
writer.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"); writer.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
writer.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"><title>"); writer.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /><title>");
writer.println(className); writer.println(className);
writer.println("</title><link rel=\"stylesheet\" type=\"text/css\" href=\"../../../stylesheet.css\"></head><body>"); writer.println("</title><link rel=\"stylesheet\" type=\"text/css\" href=\"../../../stylesheet.css\" /></head><body>");
writer.println("<table class=\"content\"><tr class=\"content\"><td class=\"content\"><div class=\"contentDiv\">"); writer.println("<table class=\"content\"><tr class=\"content\"><td class=\"content\"><div class=\"contentDiv\">");
writer.println("<h1>"+className+"</h1>"); writer.println("<h1>"+className+"</h1>");
writer.println(clazz.commentText()+"<br><br>"); writer.println(clazz.commentText()+"<br /><br />");
MethodDoc[] methods = clazz.methods(); MethodDoc[] methods = clazz.methods();
Arrays.sort(methods, new Comparator() { Arrays.sort(methods, new Comparator() {
...@@ -117,7 +117,7 @@ public class Doclet { ...@@ -117,7 +117,7 @@ public class Doclet {
continue; continue;
} }
if(fieldId==0) { if(fieldId==0) {
writer.println("<br><table><tr><th colspan=\"2\">Fields</th></tr>"); writer.println("<br /><table><tr><th colspan=\"2\">Fields</th></tr>");
} }
String name = field.name(); String name = field.name();
String type = getTypeName(true, field.type()); String type = getTypeName(true, field.type());
...@@ -174,7 +174,7 @@ public class Doclet { ...@@ -174,7 +174,7 @@ public class Doclet {
boolean space = false; boolean space = false;
for(int j=0; j<paramTags.length; j++) { for(int j=0; j<paramTags.length; j++) {
if(!space) { if(!space) {
writer.println("<br><br >"); writer.println("<br /><br />");
space = true; space = true;
} }
String p = paramTags[j].parameterName() + " - " + paramTags[j].parameterComment(); String p = paramTags[j].parameterName() + " - " + paramTags[j].parameterComment();
...@@ -186,7 +186,7 @@ public class Doclet { ...@@ -186,7 +186,7 @@ public class Doclet {
Tag[] returnTags = method.tags("return"); Tag[] returnTags = method.tags("return");
if(returnTags != null && returnTags.length>0) { if(returnTags != null && returnTags.length>0) {
if(!space) { if(!space) {
writer.println("<br><br >"); writer.println("<br /><br />");
space = true; space = true;
} }
writer.println("<div class=\"itemTitle\">Returns:</div>"); writer.println("<div class=\"itemTitle\">Returns:</div>");
...@@ -195,7 +195,7 @@ public class Doclet { ...@@ -195,7 +195,7 @@ public class Doclet {
ThrowsTag[] throwsTags = method.throwsTags(); ThrowsTag[] throwsTags = method.throwsTags();
if(throwsTags != null && throwsTags.length > 0) { if(throwsTags != null && throwsTags.length > 0) {
if(!space) { if(!space) {
writer.println("<br><br >"); writer.println("<br /><br />");
space = true; space = true;
} }
writer.println("<div class=\"itemTitle\">Throws:</div>"); writer.println("<div class=\"itemTitle\">Throws:</div>");
...@@ -208,7 +208,7 @@ public class Doclet { ...@@ -208,7 +208,7 @@ public class Doclet {
writer.println("<div class=\"item\">"+p+"</div>"); writer.println("<div class=\"item\">"+p+"</div>");
} }
} }
writer.println("<hr>"); writer.println("<hr />");
} }
writer.println("</div></td></tr></table></body></html>"); writer.println("</div></td></tr></table></body></html>");
writer.close(); writer.close();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论