提交 eb7e1d0f authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 baefd062
......@@ -18,7 +18,14 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>ALTER TABLE used a lot of memory when using multi-version concurrency.
<ul><li>Could not order by a formula when the formula was in the group by list
but not in the select list.
</li><li>Date values that match the daylight saving time end were not allowed in
times zones were the daylight saving time ends at midnight, for years larger than 2037.
Example: timezone Brasilia, date 2042-10-12. This is a problem of Java, however a
workaround is implemented in H2 that solves most problems (except the problems of
java.sql.Date itself).
</li><li>ALTER TABLE used a lot of memory when using multi-version concurrency.
</li><li>Referential integrity for in-memory databases didn't work in some cases in version 1.1.102.
</li><li>New column INFORMATION_SCHEMA.COLUMNS.SEQUENCE_NAME to get the name
of the sequence for auto-increment columns.
......
......@@ -437,6 +437,11 @@ SeQuaLite</a><br />
A free, light-weight, java data access framework released under GPL.
</p>
<p><a href="http://code.google.com/p/shapelogic/">
ShapeLogic</a><br />
Toolkit for declarative programming, image processing and computer vision.
</p>
<p><a href="http://www.shellbook.com">
Shellbook</a><br />
Desktop publishing application.
......
......@@ -384,6 +384,7 @@ Of course, patches are always welcome, but are not always applied as is. Patches
</li><li>ANALYZE: Use a bloom filter for each indexed column to estimate count of distinct values.
</li><li>ANALYZE: For unique indexes that allow null, count the number of null.
</li><li>AUTO_SERVER: support changing IP addresses (disable a network while the database is open).
</li><li>Avoid using java.util.Calendar internally because it's slow, complicated, and seems to be buggy.
</li></ul>
<h2>Not Planned</h2>
......
......@@ -452,6 +452,33 @@ If the server is started within the DbStarter, it will also be stopped automatic
web application is stopped.
</p>
<h3>Using the H2 Console Servlet</h3>
<p>
The H2 Console is a standalone application and includes its own web server, but it can be
used as a servlet as well. To do that, include the the h2 jar file in your application, and
add the following configuration to your web.xml:
</p>
<pre>
&lt;servlet&gt;
&lt;servlet-name&gt;H2Console&lt;/servlet-name&gt;
&lt;servlet-class&gt;org.h2.server.web.WebServlet&lt;/servlet-class&gt;
&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
&lt;/servlet&gt;
&lt;servlet-mapping&gt;
&lt;servlet-name&gt;H2Console&lt;/servlet-name&gt;
&lt;url-pattern&gt;/console/*&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
</pre>
<p>
For details, see also <code>src/tools/WEB-INF/web.xml</code>.
</p>
<p>
To create a web application that creates just the H2 Console, run the following command:
</p>
<pre>
build warConsole
</pre>
<br /><a name="csv"></a>
<h2>CSV (Comma Separated Values) Support</h2>
<p>
......
......@@ -215,7 +215,11 @@ public abstract class Command implements CommandInterface {
throw e;
}
try {
database.wait(100);
if (sync == database) {
database.wait(100);
} else {
Thread.sleep(100);
}
} catch (InterruptedException e1) {
// ignore
}
......
......@@ -742,11 +742,11 @@ public abstract class Value {
case DECIMAL:
return ValueDecimal.get(new BigDecimal(s.trim()));
case TIME:
return ValueTime.get(ValueTime.parseTime(s.trim()));
return ValueTime.getNoCopy(ValueTime.parseTime(s.trim()));
case DATE:
return ValueDate.get(ValueDate.parseDate(s.trim()));
return ValueDate.getNoCopy(ValueDate.parseDate(s.trim()));
case TIMESTAMP:
return ValueTimestamp.get(ValueTimestamp.parseTimestamp(s.trim()));
return ValueTimestamp.getNoCopy(ValueTimestamp.parseTimestamp(s.trim()));
case BYTES:
return ValueBytes.getNoCopy(ByteUtils.convertStringToBytes(s.trim()));
case JAVA_OBJECT:
......
......@@ -283,7 +283,12 @@ java org.h2.test.TestAll timer
fix TODO multithreaded kernel
*.bat, *.sh: maybe can use wildcards
remove old TODO
online backup may not work for very large files
(document problem with jdk 1.4; document to use jar -xf)
split files (2 GB max size)
select last_value from conf.report_id_seq
......
......@@ -31,7 +31,7 @@ public class TestMultiThreaded extends TestBase {
/**
* Processes random operations.
*/
private static class Processor extends Thread {
private class Processor extends Thread {
private int id;
private Statement stat;
private Random random;
......@@ -46,18 +46,20 @@ public class TestMultiThreaded extends TestBase {
}
public void run() {
int count = 0;
ResultSet rs;
try {
int test;
while (!isInterrupted()) {
switch(random.nextInt(3)) {
switch(random.nextInt(6)) {
case 0:
//System.out.println("insert " + id + " count: " + count);
// insert a row for this connection
trace("insert " + id + " count: " + count);
stat.execute("INSERT INTO TEST(NAME) VALUES('"+ id +"')");
count++;
break;
case 1:
// delete a row for this connection
if (count > 0) {
//System.out.println("delete " + id + " count: " + count);
trace("delete " + id + " count: " + count);
int updateCount = stat.executeUpdate(
"DELETE FROM TEST WHERE NAME = '"+ id +"' AND ROWNUM()<2");
if (updateCount != 1) {
......@@ -67,14 +69,30 @@ int test;
}
break;
case 2:
//System.out.println("select " + id + " count: " + count);
ResultSet rs = stat.executeQuery("SELECT COUNT(*) FROM TEST WHERE NAME = '"+ id +"'");
// select the number of rows of this connection
trace("select " + id + " count: " + count);
rs = stat.executeQuery("SELECT COUNT(*) FROM TEST WHERE NAME = '"+ id +"'");
rs.next();
int got = rs.getInt(1);
if (got != count) {
throw new Error("Expected: " + count + " got: " + got);
}
break;
case 3:
// insert a row
stat.execute("INSERT INTO TEST(NAME) VALUES(NULL)");
break;
case 4:
// delete a row
stat.execute("DELETE FROM TEST WHERE NAME IS NULL");
break;
case 5:
// select rows
rs = stat.executeQuery("SELECT * FROM TEST WHERE NAME IS NULL");
while (rs.next()) {
rs.getString(1);
}
break;
}
}
} catch (Throwable e) {
......@@ -85,21 +103,24 @@ int test;
public void test() throws Exception {
if (config.mvcc) {
int test;
return;
}
deleteDb("multiThreaded");
int size = getSize(2, 4);
//int size = 10;
Connection[] connList = new Connection[size];
for (int i = 0; i < size; i++) {
connList[i] = getConnection("multiThreaded;MULTI_THREADED=1");
}
Connection conn = connList[0];
Statement stat = conn.createStatement();
stat.execute("CREATE TABLE TEST(ID IDENTITY, NAME VARCHAR)");
stat.execute("SET LOCK_TIMEOUT 10000");
stat.execute("CREATE SEQUENCE TEST_SEQ");
stat.execute("CREATE TABLE TEST(ID BIGINT DEFAULT NEXT VALUE FOR TEST_SEQ, NAME VARCHAR)");
// stat.execute("CREATE TABLE TEST(ID IDENTITY, NAME VARCHAR)");
// stat.execute("CREATE INDEX IDX_TEST_NAME ON TEST(NAME)");
Processor[] processors = new Processor[size];
for (int i = 0; i < size; i++) {
conn = connList[i];
processors[i] = new Processor(conn, i);
processors[i].start();
}
......
......@@ -568,4 +568,5 @@ classname recaptcha unload unloaded unloads activator statistic hence rathsack
reflects doy bloom minimal gmx conserve panic serious robert thursday
wednesday saturday friday tuesday sharing opposite fassi dario clauses
factorial blogspot displaying thedevcloud dayof safety chrome favorite thumbs
localization olivier hprof jps jstack gpl qua processor
\ No newline at end of file
localization olivier hprof jps jstack gpl qua processor casting brasilia leap
daylight
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论