提交 56c1cf96 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 46464f46
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Connection pool: the default login timeout is now 5 minutes. <ul><li>JdbcPreparedStatement.toString() could throw a NullPointerException.
</li><li>EclipseLink: Added H2Platform.supportsIdentity().
</li><li>Connection pool: the default login timeout is now 5 minutes.
</li><li>After truncating tables, opening large databases could become slow </li><li>After truncating tables, opening large databases could become slow
because indexes were always re-built unnecessarily when opening. because indexes were always re-built unnecessarily when opening.
</li><li>More bugs in the server-less multi-connection mode have been fixed: </li><li>More bugs in the server-less multi-connection mode have been fixed:
......
...@@ -27,7 +27,7 @@ Quickstart ...@@ -27,7 +27,7 @@ Quickstart
This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to: This database can be used in embedded mode, or in server mode. To use it in embedded mode, you need to:
</p> </p>
<ul> <ul>
<li>Add the <code>h2*.jar</code> to the classpath <li>Add the <code>h2*.jar</code> to the classpath (H2 does not have any dependencies)
</li><li>Use the JDBC driver class: <code>org.h2.Driver</code> </li><li>Use the JDBC driver class: <code>org.h2.Driver</code>
</li><li>The database URL <code>jdbc:h2:~/test</code> opens the database 'test' in your user home directory </li><li>The database URL <code>jdbc:h2:~/test</code> opens the database 'test' in your user home directory
</li><li>A new database is automatically created </li><li>A new database is automatically created
......
...@@ -28,6 +28,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -28,6 +28,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Page store: new storage mechanism </li><li>Page store: new storage mechanism
</li><li>[Requires page store] Support large updates (use the transaction log to undo). </li><li>[Requires page store] Support large updates (use the transaction log to undo).
</li><li>[Requires page store] Shutdown compact </li><li>[Requires page store] Shutdown compact
</li><li>Optimize IN(...) for SELECT, DELETE, and UPDATE.
</li><li>More tests with MULTI_THREADED=1 </li><li>More tests with MULTI_THREADED=1
</li><li>RECOVER=1 should automatically recover, =2 should run the recovery tool if required </li><li>RECOVER=1 should automatically recover, =2 should run the recovery tool if required
</li><li>Optimization: result set caching (like MySQL) </li><li>Optimization: result set caching (like MySQL)
...@@ -37,7 +38,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -37,7 +38,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
<h2>Priority 2</h2> <h2>Priority 2</h2>
<ul> <ul>
<li>Improve test code coverage <li>Improve test code coverage
</li><li>Optimize IN(...) for DELETE and UPDATE.
</li><li>Procedural language / script language (Java, Javascript) </li><li>Procedural language / script language (Java, Javascript)
</li><li>Fulltext search: support streaming CLOB data. </li><li>Fulltext search: support streaming CLOB data.
</li><li>Optimize .. OR .. to IN(..) or UNION if the cost is lower </li><li>Optimize .. OR .. to IN(..) or UNION if the cost is lower
...@@ -180,8 +180,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -180,8 +180,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Make sure H2 is supported by Execute Query: http://executequery.org/ </li><li>Make sure H2 is supported by Execute Query: http://executequery.org/
</li><li>Read InputStream when executing, as late as possible (maybe only embedded mode). Problem with re-execute. </li><li>Read InputStream when executing, as late as possible (maybe only embedded mode). Problem with re-execute.
</li><li>Native fulltext search: min word length; store word positions </li><li>Native fulltext search: min word length; store word positions
</li><li>FTP Server: Implement a client to send / receive files to server (dir, get, put) </li><li>Recursive Queries (see details)
</li><li>FTP Server: Implement SFTP / FTPS
</li><li>Add an option to the SCRIPT command to generate only portable / standard SQL </li><li>Add an option to the SCRIPT command to generate only portable / standard SQL
</li><li>Test Dezign for Databases (http://www.datanamic.com) </li><li>Test Dezign for Databases (http://www.datanamic.com)
</li><li>Fast library for parsing / formatting: http://javolution.org/ </li><li>Fast library for parsing / formatting: http://javolution.org/
...@@ -208,7 +207,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -208,7 +207,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Support Sequoia (Continuent.org) </li><li>Support Sequoia (Continuent.org)
</li><li>Dynamic length numbers / special methods for DataPage.writeByte / writeShort / Ronni Nielsen </li><li>Dynamic length numbers / special methods for DataPage.writeByte / writeShort / Ronni Nielsen
</li><li>Pluggable ThreadPool, (AvalonDB / deebee / Paul Hammant) </li><li>Pluggable ThreadPool, (AvalonDB / deebee / Paul Hammant)
</li><li>Recursive Queries (see details)
</li><li>Release locks (shared or exclusive) on demand </li><li>Release locks (shared or exclusive) on demand
</li><li>Support OUTER UNION </li><li>Support OUTER UNION
</li><li>Support parameterized views (similar to CSVREAD, but using just SQL for the definition) </li><li>Support parameterized views (similar to CSVREAD, but using just SQL for the definition)
...@@ -270,6 +268,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -270,6 +268,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Optimization: don't lock when the database is read-only </li><li>Optimization: don't lock when the database is read-only
</li><li>Integrate spatial functions from http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download </li><li>Integrate spatial functions from http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download
</li><li>Support COSH, SINH, and TANH functions </li><li>Support COSH, SINH, and TANH functions
</li><li>FTP Server: Implement SFTP / FTPS
</li><li>Native search: support "phrase search", wildcard search (* and ?), case-insensitive search, boolean operators, and grouping </li><li>Native search: support "phrase search", wildcard search (* and ?), case-insensitive search, boolean operators, and grouping
</li><li>Improve documentation of access rights </li><li>Improve documentation of access rights
</li><li>Support ENUM data type (see MySQL, PostgreSQL, MS SQL Server, maybe others) </li><li>Support ENUM data type (see MySQL, PostgreSQL, MS SQL Server, maybe others)
...@@ -411,6 +410,11 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -411,6 +410,11 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Java Service Wrapper: try http://yajsw.sourceforge.net/ </li><li>Java Service Wrapper: try http://yajsw.sourceforge.net/
</li><li>Batch parameter for INSERT, UPDATE, and DELETE, and commit after each batch. See also MySQL DELETE. </li><li>Batch parameter for INSERT, UPDATE, and DELETE, and commit after each batch. See also MySQL DELETE.
</li><li>MySQL compatibility: support ALTER TABLE .. MODIFY COLUMN. </li><li>MySQL compatibility: support ALTER TABLE .. MODIFY COLUMN.
</li><li>Use a lazy and auto-close input stream (open resource when reading, close on eof).
</li><li>PostgreSQL compatibility: generate_series.
</li><li>Connection pool: 'reset session' command (delete temp tables, rollback, autocommit true).
</li><li>Improve SQL documentation, see http://www.w3schools.com/sql/
</li><li>MySQL compatibility: DatabaseMetaData.stores*() methods should return the same values. Test with SquirrelSQL.
</li></ul> </li></ul>
<h2>Not Planned</h2> <h2>Not Planned</h2>
......
#!/bin/sh #!/bin/sh
echo $(date "+%H:%M:%S") Start echo $(date "+%H:%M:%S") Start
cd ../.. cd ../..
TODAY=$(date "+%Y-%m-%d")
rm -rf ../h2web_$TODAY
rm -rf ../h2web rm -rf ../h2web
mkdir ../h2web mkdir ../h2web
...@@ -24,11 +22,11 @@ PATH=$JAVA14/bin:$PATH ...@@ -24,11 +22,11 @@ PATH=$JAVA14/bin:$PATH
./build.sh -quiet installer mavenDeployCentral ./build.sh -quiet installer mavenDeployCentral
# ./build.sh -quiet compile benchmark # ./build.sh -quiet compile benchmark
# == Copy the benchmark results and update the performance page and diagram # == Copy the benchmark results
# == and update the performance page and diagram
JAVA_HOME=$JAVA15 JAVA_HOME=$JAVA15
PATH=$JAVA15/bin:$PATH PATH=$JAVA15/bin:$PATH
./build.sh -quiet switchSource ./build.sh -quiet switchSource
mv ../h2web ../h2web_$TODAY
echo $(date "+%H:%M:%S") Done echo $(date "+%H:%M:%S") Done
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License, Version 1.0,
and under the Eclipse Public License, Version 1.0
(http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
H2 Database Engine
</title>
<style type="text/css">
td, input, select, textarea, body, code, pre, td, th {
font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif;
font-weight: normal;
}
h1, h2, h3, h4, h5 {
font: 9pt Tahoma, Arial, Helvetica, sans-serif;
font-weight: bold;
}
td, input, select, textarea, body, code, pre {
font-size: 9pt;
}
pre {
background-color: #ece9d8;
border: 1px solid rgb(172, 168, 153);
padding: 4px;
}
code {
background-color: #ece9d8;
padding: 0px 2px;
}
h1 {
background-color: #0000bb;
padding: 2px 4px 2px 4px;
color: #fff;
font-size: 15pt;
line-height: normal;
}
h2 {
font-size: 13pt;
}
h3 {
font-size: 10pt;
}
h4 {
font-size: 9pt;
}
table {
background-color: #ffffff;
border-collapse: collapse;
border: 1px solid #aca899;
}
th {
text-align: left;
background-color: #ece9d8;
border: 1px solid #aca899;
padding: 2px;
}
td {
background-color: #ffffff;
text-align: left;
vertical-align: top;
border: 1px solid #aca899;
padding: 2px;
}
</style>
</head><body>
<h1>H2 Database Engine Cheat Sheet</h1>
<h2>Downloads</h2>
<a href="http://www.h2database.com/h2-setup-2009-04-10.exe">Windows Installer</a> -
<a href="http://www.h2database.com/h2-2009-04-10.zip">Zip</a> -
<a href="http://repo1.maven.org/maven2/com/h2database/h2/1.1.111/h2-1.1.111.jar">Jar</a>
<h2>Using H2</h2>
<ul><li>Add h2*.jar to the classpath (the only dependency is Java 1.4 or newer)
</li><li>JDBC driver class: <code>org.h2.Driver</code>
</li><li>Database URL: <code>jdbc:h2:~/test</code>
</li><li>A new database is automatically created if it does not exist
</li><li>Closing the last connection closes a database
</li><li>H2 is open source, free to use and distribute. See also license.
</li></ul>
<h2>Database URL Shortlist</h2>
<table>
<tr><td rowspan="3">Embedded</td>
<td>jdbc:h2:~/test</td><td>'test' in the current user home directory</td></tr>
<tr><td>jdbc:h2:/data/test</td><td>'test' in the directory /data/</td></tr>
<tr><td>jdbc:h2:test</td><td>'test' in the current working directory</td></tr>
<tr><td rowspan="2">In-Memory</td>
<td>jdbc:h2:mem:test</td><td>named; multiple connections within the same process</td></tr>
<tr><td>jdbc:h2:mem:</td><td>unnamed private database; only one connections</td></tr>
<tr><td rowspan="2">Server Mode</td>
<td>jdbc:h2:tcp://localhost/~/test</td><td>'test' in the current user home directory</td></tr>
<tr><td>jdbc:h2:tcp://localhost//data/test</td><td>'test' in the directory /data/</td></tr>
<tr><td>Compatibility</td>
<td>jdbc:h2:...;MODE=MySQL</td><td>or DB2, Derby, HSQLDB, MSSQLServer, Oracle, PostgreSQL</td></tr>
<tr><td>Debug</td>
<td>jdbc:...;TRACE_LEVEL_FILE=3</td><td>logs JDBC calls to test.trace.db</td></tr>
</table>
<h2>H2 Console Tool</h2>
Start: double click the h2*.jar file, or run <code>java -jar h2*.jar</code>, <code>h2.bat</code> or <code>h2.sh</code>.
<h2>Maven</h2>
<pre>
&lt;dependency&gt;
&lt;groupId&gt;com.h2database&lt;/groupId&gt;
&lt;artifactId&gt;h2&lt;/artifactId&gt;
&lt;version&gt;${version}&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<h2>Hibernate</h2>
Use the H2 or the HSQLDB dialect.
<h2>TopLink and Glassfish</h2>
Datasource Classname: org.h2.jdbcx.JdbcDataSource<br />
toplink.target-database: oracle.toplink.essentials.platform.database.H2Platform
<h2>Connect using JDBC</h2>
<pre>
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection("jdbc:h2:~/test", "sa", "");
conn.close();
</pre>
<h2>Connection Pool</h2>
<pre>
JdbcConnectionPool cp = JdbcConnectionPool.create("jdbc:h2:~/test", "sa", "");
Connection conn = cp.getConnection(); ... conn.close();
cp.dispose();
</pre>
<h2>Start a Server</h2>
<pre>
java -cp h2*.jar org.h2.tools.Server
</pre>
<h2>Reference</h2>
<a href="http://www.h2database.com/html/grammar.html">SQL Grammar</a>
(or run 'HELP &lt;command&gt;' in the H2 Console) -
<a href="http://www.h2database.com/html/functions.html">Functions</a> -
<a href="http://www.h2database.com/html/datatypes.html">Data Types</a>
<h2>Other Features</h2>
Fulltext search -
Database Files Encryption -
Read Only Databases -
Read Only Databases in Zip or Jar File
<h2>Command Line Tools</h2>
Backup - ChangeFileEncryption - Console - ConvertTraceFile - CreateCluster -
DeleteDbFiles - Recover - Restore - RunScript - Script - Server - Shell
<h2>Reading CSV files</h2>
SELECT * FROM CSVREAD('test.csv');
</body></html>
\ No newline at end of file
...@@ -242,7 +242,8 @@ public class AlterTableAlterColumn extends SchemaCommand { ...@@ -242,7 +242,8 @@ public class AlterTableAlterColumn extends SchemaCommand {
int id = db.allocateObjectId(true, true); int id = db.allocateObjectId(true, true);
TableData newTable = getSchema().createTable(tempName, id, newColumns, table.isPersistIndexes(), table.isPersistData(), false, Index.EMPTY_HEAD); TableData newTable = getSchema().createTable(tempName, id, newColumns, table.isPersistIndexes(), table.isPersistData(), false, Index.EMPTY_HEAD);
newTable.setComment(table.getComment()); newTable.setComment(table.getComment());
StringBuffer buff = new StringBuffer(newTable.getCreateSQL()); StringBuffer buff = new StringBuffer();
buff.append(newTable.getCreateSQL());
StringBuffer columnList = new StringBuffer(); StringBuffer columnList = new StringBuffer();
for (int i = 0; i < newColumns.size(); i++) { for (int i = 0; i < newColumns.size(); i++) {
Column nc = (Column) newColumns.get(i); Column nc = (Column) newColumns.get(i);
......
...@@ -96,7 +96,8 @@ public class Set extends Prepared { ...@@ -96,7 +96,8 @@ public class Set extends Prepared {
throw Message.getSQLException(ErrorCode.COLLATION_CHANGE_WITH_DATA_TABLE_1, table.getSQL()); throw Message.getSQLException(ErrorCode.COLLATION_CHANGE_WITH_DATA_TABLE_1, table.getSQL());
} }
CompareMode compareMode; CompareMode compareMode;
StringBuffer buff = new StringBuffer(stringValue); StringBuffer buff = new StringBuffer();
buff.append(stringValue);
if (stringValue.equals(CompareMode.OFF)) { if (stringValue.equals(CompareMode.OFF)) {
compareMode = new CompareMode(null, null, 0); compareMode = new CompareMode(null, null, 0);
} else { } else {
......
...@@ -100,6 +100,7 @@ public class Session extends SessionWithState { ...@@ -100,6 +100,7 @@ public class Session extends SessionWithState {
private Table waitForLock; private Table waitForLock;
private int modificationId; private int modificationId;
private int modificationIdState; private int modificationIdState;
private int objectId;
Session(Database database, User user, int id) { Session(Database database, User user, int id) {
this.database = database; this.database = database;
...@@ -1147,4 +1148,13 @@ public class Session extends SessionWithState { ...@@ -1147,4 +1148,13 @@ public class Session extends SessionWithState {
return ValueString.get(firstUncommittedLog+"-" + firstUncommittedPos + "-" + id); return ValueString.get(firstUncommittedLog+"-" + firstUncommittedPos + "-" + id);
} }
/**
* Get the next object id.
*
* @return the next object id
*/
public int nextObjectId() {
return objectId++;
}
} }
...@@ -16,7 +16,10 @@ LIMIT limits the number of rows returned by the query, OFFSET specified how many ...@@ -16,7 +16,10 @@ LIMIT limits the number of rows returned by the query, OFFSET specified how many
rows to skip. SAMPLE_SIZE limits the number of rows read for aggregate queries. rows to skip. SAMPLE_SIZE limits the number of rows read for aggregate queries.
If FOR UPDATE is specified, the tables are locked for writing. If FOR UPDATE is specified, the tables are locked for writing.
"," ","
SELECT * FROM TEST SELECT * FROM TEST;
SELECT * FROM (SELECT ID, COUNT(*) FROM TEST
GROUP BY ID UNION SELECT NULL, COUNT(*) FROM TEST)
ORDER BY 1 NULLS LAST;
" "
"Commands (DML)","INSERT"," "Commands (DML)","INSERT","
...@@ -921,19 +924,23 @@ SET IGNORECASE TRUE ...@@ -921,19 +924,23 @@ SET IGNORECASE TRUE
"Commands (Other)","SET LOCK_MODE"," "Commands (Other)","SET LOCK_MODE","
SET LOCK_MODE int SET LOCK_MODE int
"," ","
Sets the lock mode. The values 0, 1, 2, and 3 are supported. Sets the lock mode. The values 0, 1, 2, and 3 are supported. The default is 3
(READ_COMMITTED).
The value 0 means no locking (should only be used for testing; also known as The value 0 means no locking (should only be used for testing; also known as
READ_UNCOMMITTED). The value 1 means table level locking (also known as READ_UNCOMMITTED). Please note that using SET LOCK_MODE 0 while at the same time
SERIALIZABLE). The value 2 means table level locking with garbage collection (if using multiple connections may result in inconsistent transactions.
the application does not close all connections). The value 3 means table level
locking, but read locks are released immediately (default; also known as The value 1 means table level locking (also known as SERIALIZABLE).
READ_COMMITTED).
The value 2 means table level locking with garbage collection (if the
This setting is not persistent. Please note that using SET LOCK_MODE 0 while at application does not close all connections).
the same time using multiple connections may result in inconsistent
transactions. Admin rights are required to execute this command. This setting The value 3 means table level locking, but read locks are released immediately
can be appended to the database URL: jdbc:h2:test;LOCK_MODE=3 (default; also known as READ_COMMITTED).
This setting is persistent. Admin rights are required to execute this command.
This setting can be appended to the database URL: jdbc:h2:test;LOCK_MODE=3
"," ","
SET LOCK_MODE 1 SET LOCK_MODE 1
" "
......
...@@ -45,7 +45,8 @@ public class PageParser { ...@@ -45,7 +45,8 @@ public class PageParser {
private void setError(int i) { private void setError(int i) {
String s = page.substring(0, i) + "####BUG####" + page.substring(i); String s = page.substring(0, i) + "####BUG####" + page.substring(i);
s = PageParser.escapeHtml(s); s = PageParser.escapeHtml(s);
result = new StringBuffer(s); result = new StringBuffer();
result.append(s);
} }
private String parseBlockUntil(String end) throws ParseException { private String parseBlockUntil(String end) throws ParseException {
......
...@@ -1508,10 +1508,8 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1508,10 +1508,8 @@ class WebThread extends Thread implements DatabaseEventListener {
rs.addRow(new String[] { "meta.isReadOnly", "" + meta.isReadOnly() }); rs.addRow(new String[] { "meta.isReadOnly", "" + meta.isReadOnly() });
rs.addRow(new String[] { "meta.allProceduresAreCallable", "" + meta.allProceduresAreCallable() }); rs.addRow(new String[] { "meta.allProceduresAreCallable", "" + meta.allProceduresAreCallable() });
rs.addRow(new String[] { "meta.allTablesAreSelectable", "" + meta.allTablesAreSelectable() }); rs.addRow(new String[] { "meta.allTablesAreSelectable", "" + meta.allTablesAreSelectable() });
rs.addRow(new String[] { "meta.dataDefinitionCausesTransactionCommit", rs.addRow(new String[] { "meta.dataDefinitionCausesTransactionCommit", "" + meta.dataDefinitionCausesTransactionCommit() });
"" + meta.dataDefinitionCausesTransactionCommit() }); rs.addRow(new String[] { "meta.dataDefinitionIgnoredInTransactions", "" + meta.dataDefinitionIgnoredInTransactions() });
rs.addRow(new String[] { "meta.dataDefinitionIgnoredInTransactions",
"" + meta.dataDefinitionIgnoredInTransactions() });
rs.addRow(new String[] { "meta.doesMaxRowSizeIncludeBlobs", "" + meta.doesMaxRowSizeIncludeBlobs() }); rs.addRow(new String[] { "meta.doesMaxRowSizeIncludeBlobs", "" + meta.doesMaxRowSizeIncludeBlobs() });
rs.addRow(new String[] { "meta.nullPlusNonNullIsNull", "" + meta.nullPlusNonNullIsNull() }); rs.addRow(new String[] { "meta.nullPlusNonNullIsNull", "" + meta.nullPlusNonNullIsNull() });
rs.addRow(new String[] { "meta.nullsAreSortedAtEnd", "" + meta.nullsAreSortedAtEnd() }); rs.addRow(new String[] { "meta.nullsAreSortedAtEnd", "" + meta.nullsAreSortedAtEnd() });
...@@ -1519,18 +1517,13 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1519,18 +1517,13 @@ class WebThread extends Thread implements DatabaseEventListener {
rs.addRow(new String[] { "meta.nullsAreSortedHigh", "" + meta.nullsAreSortedHigh() }); rs.addRow(new String[] { "meta.nullsAreSortedHigh", "" + meta.nullsAreSortedHigh() });
rs.addRow(new String[] { "meta.nullsAreSortedLow", "" + meta.nullsAreSortedLow() }); rs.addRow(new String[] { "meta.nullsAreSortedLow", "" + meta.nullsAreSortedLow() });
rs.addRow(new String[] { "meta.storesLowerCaseIdentifiers", "" + meta.storesLowerCaseIdentifiers() }); rs.addRow(new String[] { "meta.storesLowerCaseIdentifiers", "" + meta.storesLowerCaseIdentifiers() });
rs.addRow(new String[] { "meta.storesLowerCaseQuotedIdentifiers", rs.addRow(new String[] { "meta.storesLowerCaseQuotedIdentifiers", "" + meta.storesLowerCaseQuotedIdentifiers() });
"" + meta.storesLowerCaseQuotedIdentifiers() });
rs.addRow(new String[] { "meta.storesMixedCaseIdentifiers", "" + meta.storesMixedCaseIdentifiers() }); rs.addRow(new String[] { "meta.storesMixedCaseIdentifiers", "" + meta.storesMixedCaseIdentifiers() });
rs.addRow(new String[] { "meta.storesMixedCaseQuotedIdentifiers", rs.addRow(new String[] { "meta.storesMixedCaseQuotedIdentifiers", "" + meta.storesMixedCaseQuotedIdentifiers() });
"" + meta.storesMixedCaseQuotedIdentifiers() });
rs.addRow(new String[] { "meta.storesUpperCaseIdentifiers", "" + meta.storesUpperCaseIdentifiers() }); rs.addRow(new String[] { "meta.storesUpperCaseIdentifiers", "" + meta.storesUpperCaseIdentifiers() });
rs.addRow(new String[] { "meta.storesUpperCaseQuotedIdentifiers", rs.addRow(new String[] { "meta.storesUpperCaseQuotedIdentifiers", "" + meta.storesUpperCaseQuotedIdentifiers() });
"" + meta.storesUpperCaseQuotedIdentifiers() }); rs.addRow(new String[] { "meta.supportsAlterTableWithAddColumn", "" + meta.supportsAlterTableWithAddColumn() });
rs.addRow(new String[] { "meta.supportsAlterTableWithAddColumn", rs.addRow(new String[] { "meta.supportsAlterTableWithDropColumn", "" + meta.supportsAlterTableWithDropColumn() });
"" + meta.supportsAlterTableWithAddColumn() });
rs.addRow(new String[] { "meta.supportsAlterTableWithDropColumn",
"" + meta.supportsAlterTableWithDropColumn() });
rs.addRow(new String[] { "meta.supportsANSI92EntryLevelSQL", "" + meta.supportsANSI92EntryLevelSQL() }); rs.addRow(new String[] { "meta.supportsANSI92EntryLevelSQL", "" + meta.supportsANSI92EntryLevelSQL() });
rs.addRow(new String[] { "meta.supportsANSI92FullSQL", "" + meta.supportsANSI92FullSQL() }); rs.addRow(new String[] { "meta.supportsANSI92FullSQL", "" + meta.supportsANSI92FullSQL() });
rs.addRow(new String[] { "meta.supportsANSI92IntermediateSQL", "" + meta.supportsANSI92IntermediateSQL() }); rs.addRow(new String[] { "meta.supportsANSI92IntermediateSQL", "" + meta.supportsANSI92IntermediateSQL() });
......
...@@ -876,8 +876,6 @@ public class StringUtils { ...@@ -876,8 +876,6 @@ public class StringUtils {
*/ */
public static String trim(String s, boolean leading, boolean trailing, String sp) { public static String trim(String s, boolean leading, boolean trailing, String sp) {
char space = (sp == null || sp.length() < 1) ? ' ' : sp.charAt(0); char space = (sp == null || sp.length() < 1) ? ' ' : sp.charAt(0);
// TODO function trim: HSQLDB says 'tabs are not removed', but they are.
// check what other databases do
if (leading) { if (leading) {
int len = s.length(), i = 0; int len = s.length(), i = 0;
while (i < len && s.charAt(i) == space) { while (i < len && s.charAt(i) == space) {
......
...@@ -290,6 +290,8 @@ java org.h2.test.TestAll timer ...@@ -290,6 +290,8 @@ java org.h2.test.TestAll timer
/* /*
test case for running out of disk space (using a special file system)
test shell tool on windows with special characters, try with test shell tool on windows with special characters, try with
java -Dfile.encoding=UTF-8 java -Dfile.encoding=UTF-8
...@@ -297,74 +299,21 @@ auto-build: prepare release ...@@ -297,74 +299,21 @@ auto-build: prepare release
documentation: rolling review at roadmap.html: done documentation: rolling review at roadmap.html: done
checksum for downloads create a short documentation
lazy file input stream
auto close input stream
create a short 4 pages documentation
documentation: how can you improve performance (group of settings)
test performance with log=2 test performance with log=2
postgresql generate_series?
multithreaded kernel multithreaded kernel
remove old TODO
Check JBoss and Spring support models remove old TODO
http://wiki.bonita.ow2.org/xwiki/bin/view/Main/BullOffer
- starting 2500 euros / year
- unlimited support requests
- 2 named contacts
- optional half days of technical aid by remote services
auto_reconnect
implemented:
- auto_server includes auto_reconnect
- works with server mode
- works with auto_server mode
- keep temporary linked tables, variables on client
- statements
- prepared statements
- small result sets (up to fetch size)
- throws an error when autocommit is false
- an error is thrown when the connection is lost
while looping over large result sets (larger than fetch size)
not implemented / not tested
- batch updates
- ignored in embedded mode
- keep temporary tables (including data) on client
- keep identity, getGeneratedKeys on client
- throw error when in cluster mode
TestMVCC: TestMVCC:
Concurrent update in table test: another transaction has updated or Concurrent update in table test: another transaction has updated or
deleted the same row when exactly does it occur in other databases deleted the same row when exactly does it occur in other databases
(PostgreSQL, Oracle)? (PostgreSQL, Oracle)?
documentation: use 'server mode' not 'remote mode'.
CREATE FUNCTION? Function interface; HSQLDB compatibility CREATE FUNCTION? Function interface; HSQLDB compatibility
find quote:
You can't make a system that will not lose data, you can only make
a system that knows the last save point of 100% integrity. There are
too many variables and too much randomness on a cold hard power failure.
not tested:
PreparedProcedure PREPARE <name>(column,...) AS ...
Procedure
DeallocateProcedure DEALLOCATE [PLAN] <name>
ExecuteProcedure EXECUTE <name>[([p[,...])]
optimize where x not in (select):
SELECT c FROM color LEFT OUTER JOIN (SELECT c FROM TABLE(c
VARCHAR= ?)) p ON color.c = p.c WHERE p.c IS NULL;
http://www.w3schools.com/sql/
kill a specific java process: kill a specific java process:
kill -9 `jps -l | grep "org.h2.test.TestAll" | cut -d " " -f 1` kill -9 `jps -l | grep "org.h2.test.TestAll" | cut -d " " -f 1`
......
...@@ -73,4 +73,40 @@ select id, 'data1' from statisticlog order by moment limit 5; ...@@ -73,4 +73,40 @@ select id, 'data1' from statisticlog order by moment limit 5;
select * from statisticlog where id < 10; select * from statisticlog where id < 10;
UPDATE statisticlog SET datatext = 'data2' UPDATE statisticlog SET datatext = 'data2'
WHERE id IN (SELECT id FROM statisticlog ORDER BY moment LIMIT 5); WHERE id IN (SELECT id FROM statisticlog ORDER BY moment LIMIT 5);
select * from statisticlog where id < 10; select * from statisticlog where id < 10;
\ No newline at end of file
Auto-Reconnect
-----------------
Implemented:
- auto_server includes auto_reconnect
- works with server mode
- works with auto_server mode
- keep temporary linked tables, variables on client
- statements
- prepared statements
- small result sets (up to fetch size)
- throws an error when autocommit is false
- an error is thrown when the connection is lost
while looping over large result sets (larger than fetch size)
Not implemented / not tested:
- batch updates
- ignored in embedded mode
- keep temporary tables (including data) on client
- keep identity, getGeneratedKeys on client
- throw error when in cluster mode
Support Model
-----------------
Check JBoss and Spring support models
http://wiki.bonita.ow2.org/xwiki/bin/view/Main/BullOffer
- starting 2500 euros / year
- unlimited support requests
- 2 named contacts
- optional half days of technical aid by remote services
Durability
-----------------
Improve documentation.
You can't make a system that will not lose data, you can only make
a system that knows the last save point of 100% integrity. There are
too many variables and too much randomness on a cold hard power failure.
...@@ -28,6 +28,7 @@ public class SpellChecker { ...@@ -28,6 +28,7 @@ public class SpellChecker {
"csv", "xml", "js", "Driver", "properties", "task", "MF", "sh", "" }; "csv", "xml", "js", "Driver", "properties", "task", "MF", "sh", "" };
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", "svg" }; "bz2", "rc", "layout", "res", "dll", "jar", "svg" };
private static final String DELIMITERS = " \n.();-\"=,*/{}_<>+\r:'@[]&\\!#|?$^%~`\t";
private static final String PREFIX_IGNORE = "abc"; private static final String PREFIX_IGNORE = "abc";
private static final String IGNORE_FILE = "mainWeb.html"; private static final String IGNORE_FILE = "mainWeb.html";
...@@ -149,7 +150,7 @@ public class SpellChecker { ...@@ -149,7 +150,7 @@ public class SpellChecker {
private void scan(String fileName, String text) { private void scan(String fileName, String text) {
HashSet notFound = new HashSet(); HashSet notFound = new HashSet();
text = removeLinks(fileName, text); text = removeLinks(fileName, text);
StringTokenizer tokenizer = new StringTokenizer(text, "\r\n \t+\"*%&/()='[]{},.-;:_<>\\!?$@#|~^`"); StringTokenizer tokenizer = new StringTokenizer(text, DELIMITERS);
while (tokenizer.hasMoreTokens()) { while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken(); String token = tokenizer.nextToken();
char first = token.charAt(0); char first = token.charAt(0);
......
...@@ -587,4 +587,5 @@ consistently springfuse grep signatures wrote symbolic parents caches readers ...@@ -587,4 +587,5 @@ consistently springfuse grep signatures wrote symbolic parents caches readers
animate scaladoc models disadvantages vladykin sergi trims requesting animate scaladoc models disadvantages vladykin sergi trims requesting
handing bonita placed euros embeds reliability singular unregister quotas handing bonita placed euros embeds reliability singular unregister quotas
overall httpdocs tigris eclemma separates underscore yajsw she her truncating overall httpdocs tigris eclemma separates underscore yajsw she her truncating
relocating smtps smtp osde joist catching guesses relocating smtps smtp osde joist catching guesses delimiters shortlist sheet
\ No newline at end of file rowspan cheat
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论